Reviewers: ,


Please review this at http://codereview.tryton.org/385002/

Affected files:
  M work.py


Index: work.py
===================================================================

--- a/work.py
+++ b/work.py
@@ -20,7 +20,11 @@
     right = fields.Integer('Right', required=True, select=True)
     children = fields.One2Many('timesheet.work', 'parent', 'Children')
     hours = fields.Function(fields.Float('Timesheet Hours', digits=(16, 2),
-        help="Total time spent on this work"), 'get_hours')
+            states={
+                'invisible': ~Eval('timesheet_available'),
+                },
+            depends=['timesheet_available'],
+            help="Total time spent on this work"), 'get_hours')
     timesheet_available = fields.Boolean('Available on timesheets',
         states={
             'readonly': Bool(Eval('timesheet_lines', [0])),



--
tryton-dev@googlegroups.com mailing list

Reply via email to