changeset baecd5987f00 in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset&node=baecd5987f00
description:
        Add new depends from new get_eval_fields implementation

        issue11164
diffstat:

 move_template.py |   6 ++++--
 tax.py           |  11 ++++++-----
 2 files changed, 10 insertions(+), 7 deletions(-)

diffs (72 lines):

diff -r e097fb6bf10d -r baecd5987f00 move_template.py
--- a/move_template.py  Sun Jan 30 13:05:00 2022 +0100
+++ b/move_template.py  Sun Jan 30 20:17:47 2022 +0100
@@ -168,7 +168,8 @@
             ('type', '!=', None),
             ('closed', '!=', True),
             ('company', '=', Eval('_parent_move', {}).get('company', -1)),
-            ])
+            ],
+        depends=['move'])
     party = fields.Char('Party',
         states={
             'required': Eval('party_required', False),
@@ -234,7 +235,8 @@
         domain=[
             ('company', '=', Eval('_parent_line', {}
                     ).get('_parent_move', {}).get('company', -1)),
-            ])
+            ],
+        depends=['line'])
 
     @classmethod
     def __setup__(cls):
diff -r e097fb6bf10d -r baecd5987f00 tax.py
--- a/tax.py    Sun Jan 30 13:05:00 2022 +0100
+++ b/tax.py    Sun Jan 30 20:17:47 2022 +0100
@@ -369,7 +369,8 @@
         'account.tax', "Tax", required=True, states=_states,
         domain=[
             ('company', '=', Eval('_parent_code', {}).get('company')),
-            ])
+            ],
+        depends=['code'])
     amount = fields.Selection([
             ('tax', "Tax"),
             ('base', "Base"),
@@ -1504,7 +1505,7 @@
             ],
         help=('If the original tax template is filled, the rule will be '
             'applied only for this tax template.'),
-        depends=['group'],
+        depends=['group', 'rule'],
         ondelete='RESTRICT')
     keep_origin = fields.Boolean("Keep Origin",
         help="Check to append the original tax to substituted tax.")
@@ -1523,7 +1524,7 @@
                         ('group.kind', 'in', ['sale', 'purchase', 'both']))),
                 ],
             ],
-        depends=['group'],
+        depends=['group', 'rule'],
         ondelete='RESTRICT')
 
     @classmethod
@@ -1625,7 +1626,7 @@
             ],
         help=('If the original tax is filled, the rule will be applied '
             'only for this tax.'),
-        depends=['group'],
+        depends=['group', 'rule'],
         ondelete='RESTRICT', states=_states)
     keep_origin = fields.Boolean("Keep Origin", states=_states,
         help="Check to append the original tax to substituted tax.")
@@ -1644,7 +1645,7 @@
                         ('group.kind', 'in', ['sale', 'purchase', 'both']))),
                 ],
             ],
-        depends=['group'],
+        depends=['group', 'rule'],
         ondelete='RESTRICT', states=_states)
     template = fields.Many2One(
         'account.tax.rule.line.template', 'Template', ondelete='CASCADE')

Reply via email to