Skip to content
Snippets Groups Projects
Commit 51f5fd7f authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[fix] check_hours constrain on date

parent 3a75e877
No related branches found
No related tags found
No related merge requests found
......@@ -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([
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment