From 46aee5b12bb58ad928b55063554efd98c089be7b Mon Sep 17 00:00:00 2001 From: Daniel Palumbo Date: Fri, 26 Jun 2026 09:06:53 +0200 Subject: [PATCH] =?UTF-8?q?The=20bug=20was=20in=20the=20@api.depends=20dec?= =?UTF-8?q?orator=20=E2=80=94=20it=20only=20lists=20payment=5Fmode=5Fid=20?= =?UTF-8?q?but=20the=20compute=20body=20also=20reads=20child=5Fid,=20birth?= =?UTF-8?q?day=5Finvoice,=20and=20christmas=5Finvoice.=20So=20when=20you?= =?UTF-8?q?=20add=20a=20child=20on=20a=20new=20form,=20the=20compute=20doe?= =?UTF-8?q?sn't=20re-run,=20is=5Fgift=5Fauthorized=20stays=20False=20from?= =?UTF-8?q?=20the=20previous=20run,=20and=20th=20view=20shows=20the=20warn?= =?UTF-8?q?ing=20even=20though=20no=20annual=20gift=20is=20set.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sponsorship_compassion/models/contracts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship_compassion/models/contracts.py b/sponsorship_compassion/models/contracts.py index c6c715752..643b075d2 100644 --- a/sponsorship_compassion/models/contracts.py +++ b/sponsorship_compassion/models/contracts.py @@ -504,7 +504,7 @@ def _compute_is_direct_debit(self): for contract in self: contract.is_direct_debit = contract.payment_mode_id in dd_modes - @api.depends("payment_mode_id") + @api.depends("payment_mode_id", "child_id", "birthday_invoice", "christmas_invoice") def _compute_is_gift_auth(self): for contract in self: contract.is_gift_authorized = contract.child_id