changeset 2c000c51e364 in modules/account:4.8
details: https://hg.tryton.org/modules/account?cmd=changeset;node=2c000c51e364
description:
        Add missing parent depends

        issue8712
        review258221002
        (grafted from 9b385ff0d6db351636bed2d59f68ca9f93df0881)
diffstat:

 account.py |  3 ++-
 period.py  |  2 +-
 tax.py     |  2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diffs (37 lines):

diff -r 1c72e8d50c0f -r 2c000c51e364 account.py
--- a/account.py        Mon Jul 01 22:15:35 2019 +0200
+++ b/account.py        Wed Oct 16 21:17:39 2019 +0200
@@ -968,7 +968,8 @@
         'reconcile', 'kind', 'deferral', 'party_required',
         'general_ledger_balance', 'taxes']
 
-    @fields.depends('parent', *__on_change_parent_fields)
+    @fields.depends('parent', *(__on_change_parent_fields
+            + ['_parent_parent.%s' % f for f in __on_change_parent_fields]))
     def on_change_parent(self):
         if not self.parent:
             return
diff -r 1c72e8d50c0f -r 2c000c51e364 period.py
--- a/period.py Mon Jul 01 22:15:35 2019 +0200
+++ b/period.py Wed Oct 16 21:17:39 2019 +0200
@@ -114,7 +114,7 @@
     def default_type():
         return 'standard'
 
-    @fields.depends('fiscalyear')
+    @fields.depends('fiscalyear', '_parent_fiscalyear.company')
     def on_change_with_company(self, name=None):
         if self.fiscalyear:
             return self.fiscalyear.company.id
diff -r 1c72e8d50c0f -r 2c000c51e364 tax.py
--- a/tax.py    Mon Jul 01 22:15:35 2019 +0200
+++ b/tax.py    Wed Oct 16 21:17:39 2019 +0200
@@ -1260,7 +1260,7 @@
                         & (table.code.in_(
                                 [invoice_base_code, credit_note_base_code]))))
 
-    @fields.depends('move_line')
+    @fields.depends('move_line', '_parent_move_line.currency_digits')
     def on_change_with_currency_digits(self, name=None):
         if self.move_line:
             return self.move_line.currency_digits

Reply via email to