diff --git a/models/hr_timesheet.py b/models/hr_timesheet.py index 9c59199cc0d8fb76f49fb70c25d50ee7e9eee412..c41b24719abe5704f7b2fa608005e4d15b97ae5e 100644 --- a/models/hr_timesheet.py +++ b/models/hr_timesheet.py @@ -121,7 +121,6 @@ class ScopHrTimesheet(models.Model): result.append((ts.id, name)) return result - # ------------------------------------------------------ # OnChange Functions # ------------------------------------------------------ @@ -148,7 +147,7 @@ class ScopHrTimesheet(models.Model): # ------------------------------------------------------ # Contrains # ------------------------------------------------------ - @api.constrains('unit_amount') + @api.constrains('unit_amount', 'date') def _check_hours(self): for record in self: lines = self.search([ diff --git a/views/hr_timesheet.xml b/views/hr_timesheet.xml index 24c171bfbbb3d19a911e12aec018baf546d05e31..98f7216521eac3d6e88836be4f3f0b491930d73e 100644 --- a/views/hr_timesheet.xml +++ b/views/hr_timesheet.xml @@ -163,7 +163,11 @@ <field name="name">account.analytic.line.timesheet.cgscop.calendar</field> <field name="model">account.analytic.line</field> <field name="arch" type="xml"> - <calendar string="Ligne de temps" date_start="date" mode="month" quick_add="False" color="project_id" readonly_form_view_id="cgscop_timesheet.view_cgscop_hr_timesheet_line_form"> + <calendar string="Ligne de temps" + date_start="date" mode="month" + quick_add="False" + color="project_id" + readonly_form_view_id="cgscop_timesheet.view_cgscop_hr_timesheet_line_form"> <field name="calendar_l1"/> <field name="calendar_l2"/> </calendar>