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

        issue11134
        review380081002
diffstat:

 line.py |  3 ---
 work.py |  4 ----
 2 files changed, 0 insertions(+), 7 deletions(-)

diffs (61 lines):

diff -r cbb75a7bbe60 -r 8294ff41a637 line.py
--- a/line.py   Wed Apr 06 23:37:44 2022 +0200
+++ b/line.py   Fri Apr 08 19:07:14 2022 +0200
@@ -34,7 +34,6 @@
                 ('end_date', '>=', Eval('date', None)),
                 ],
             ],
-        depends=['company', 'date'],
         help="The employee who spends the time.")
     date = fields.Date('Date', required=True, select=True,
         help="When the time is spent.")
@@ -51,7 +50,6 @@
                 ('timesheet_end_date', '>=', Eval('date', None)),
                 ],
             ],
-        depends=['date', 'company'],
         help="The work on which the time is spent.")
     description = fields.Char('Description',
         help="Additional description of the work done.")
@@ -177,7 +175,6 @@
                 ('end_date', '>=', Eval('date', None)),
                 ],
             ],
-        depends=['date'],
         help="The employee who spends the time.")
     date = fields.Date('Date', required=True,
         help="When the time is spent.")
diff -r cbb75a7bbe60 -r 8294ff41a637 work.py
--- a/work.py   Wed Apr 06 23:37:44 2022 +0200
+++ b/work.py   Fri Apr 08 19:07:14 2022 +0200
@@ -24,14 +24,12 @@
             'invisible': Bool(Eval('origin')),
             'required': ~Eval('origin'),
             },
-        depends=['origin'],
         help="The main identifier of the work.")
     origin = fields.Reference('Origin', selection='get_origin',
         states={
             'invisible': Bool(Eval('name')),
             'required': ~Eval('name'),
             },
-        depends=['name'],
         help="Use to relate the time spent to other records.")
     duration = fields.Function(fields.TimeDelta('Timesheet Duration',
             'company_work_time', help="Total time spent on this work."),
@@ -42,7 +40,6 @@
                 ('timesheet_start_date', '<=', Eval('timesheet_end_date')),
                 ()),
             ],
-        depends=['timesheet_end_date'],
         help="Restrict adding lines before the date.")
     timesheet_end_date = fields.Date('Timesheet End',
         domain=[
@@ -50,7 +47,6 @@
                 ('timesheet_end_date', '>=', Eval('timesheet_start_date')),
                 ()),
             ],
-        depends=['timesheet_start_date'],
         help="Restrict adding lines after the date.")
     company = fields.Many2One('company.company', 'Company', required=True,
         select=True, help="Make the work belong to the company.")

Reply via email to