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

        issue11134
        review380081002
diffstat:

 attendance.py |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (31 lines):

diff -r adaa15612142 -r 44b648a7c4c2 attendance.py
--- a/attendance.py     Wed Apr 06 23:37:42 2022 +0200
+++ b/attendance.py     Fri Apr 08 19:07:13 2022 +0200
@@ -48,8 +48,7 @@
                 ('end_date', '=', None),
                 ('end_date', '>=', Eval('date', None)),
                 ],
-            ],
-        depends=['company', 'date'])
+            ])
     at = fields.DateTime("At", required=True)
     date = fields.Date("Date", required=True)
     type = fields.Selection([
@@ -161,15 +160,12 @@
     _states = {
         'readonly': Eval('state') == 'closed',
         }
-    _depends = ['state']
 
     _last_period_cache = Cache('attendance.period', context=False)
 
-    ends_at = fields.DateTime("Ends at", required=True, states=_states,
-        depends=_depends)
+    ends_at = fields.DateTime("Ends at", required=True, states=_states)
     company = fields.Many2One('company.company', "Company", required=True,
-        states=_states, depends=_depends,
-        help="The company the period is associated with.")
+        states=_states, help="The company the period is associated with.")
     state = fields.Selection([
         ('draft', 'Draft'),
         ('closed', 'Closed'),

Reply via email to