changeset b55a79549c6b in modules/account_fr_chorus:default
details: 
https://hg.tryton.org/modules/account_fr_chorus?cmd=changeset&node=b55a79549c6b
description:
        Send only the required fields when fetching a readonly view definition

        issue11134
        review380081002
diffstat:

 account.py |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (38 lines):

diff -r d9a67895dc64 -r b55a79549c6b account.py
--- a/account.py        Wed Apr 06 23:37:41 2022 +0200
+++ b/account.py        Fri Apr 08 19:07:12 2022 +0200
@@ -54,20 +54,19 @@
     _states = {
         'required': Bool(Eval('chorus_login')),
         }
-    _depends = ['chorus_login']
 
     chorus_login = fields.MultiValue(fields.Char("Chorus Login"))
     chorus_password = fields.MultiValue(fields.Char(
-            "Chorus Password", states=_states, depends=_depends))
+            "Chorus Password", states=_states))
     chorus_service = fields.MultiValue(fields.Selection([
                 (None, ""),
                 ('service-qualif', "Qualification"),
                 ('service', "Production"),
-                ], "Chorus Service", states=_states, depends=_depends))
+                ], "Chorus Service", states=_states))
     chorus_syntax = fields.Selection(
-        'get_syntaxes', "Chorus Syntax", states=_states, depends=_depends)
+        'get_syntaxes', "Chorus Syntax", states=_states)
 
-    del _states, _depends
+    del _states
 
     @classmethod
     def multivalue_model(cls, field):
@@ -129,8 +128,7 @@
             ('state', 'in', If(Bool(Eval('number')),
                     ['posted', 'paid'],
                     ['posted'])),
-            ],
-        depends=['number'])
+            ])
     syntax = fields.Selection('get_syntaxes', "Syntax", required=True)
     number = fields.Char("Number", readonly=True)
     date = fields.Date("Date", readonly=True)

Reply via email to