Skip to content
Extraits de code Groupes Projets
Valider 51f5fd7f rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[fix] check_hours constrain on date

parent 3a75e877
Branches 14-RV-20250129
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -121,7 +121,6 @@ class ScopHrTimesheet(models.Model): ...@@ -121,7 +121,6 @@ class ScopHrTimesheet(models.Model):
result.append((ts.id, name)) result.append((ts.id, name))
return result return result
# ------------------------------------------------------ # ------------------------------------------------------
# OnChange Functions # OnChange Functions
# ------------------------------------------------------ # ------------------------------------------------------
...@@ -148,7 +147,7 @@ class ScopHrTimesheet(models.Model): ...@@ -148,7 +147,7 @@ class ScopHrTimesheet(models.Model):
# ------------------------------------------------------ # ------------------------------------------------------
# Contrains # Contrains
# ------------------------------------------------------ # ------------------------------------------------------
@api.constrains('unit_amount') @api.constrains('unit_amount', 'date')
def _check_hours(self): def _check_hours(self):
for record in self: for record in self:
lines = self.search([ lines = self.search([
......
...@@ -163,7 +163,11 @@ ...@@ -163,7 +163,11 @@
<field name="name">account.analytic.line.timesheet.cgscop.calendar</field> <field name="name">account.analytic.line.timesheet.cgscop.calendar</field>
<field name="model">account.analytic.line</field> <field name="model">account.analytic.line</field>
<field name="arch" type="xml"> <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_l1"/>
<field name="calendar_l2"/> <field name="calendar_l2"/>
</calendar> </calendar>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter