diff --git a/models/hr_timesheet.py b/models/hr_timesheet.py index eb79d8bb69cfae93db4a60cdba025d35805ac0ea..b73e2c648b455cca617d86080dfee367f17e5939 100644 --- a/models/hr_timesheet.py +++ b/models/hr_timesheet.py @@ -26,7 +26,7 @@ class ScopHrTimesheet(models.Model): 'union.regionale', string='Union Régionale', index=True, - on_delete='restrict', + ondelete='restrict', default=_default_ur) sheet_id = fields.Many2one( comodel_name='cgscop.timesheet.sheet', @@ -104,7 +104,8 @@ class ScopHrTimesheet(models.Model): total = sum(lines.mapped('unit_amount')) if total > 8: raise ValidationError( - "Vous ne pourvez imputer plus de 8h sur la même journée") + "Vous ne pourvez imputer plus de 8h sur la même journée.\n" + "Journée du %s" % record.date.strftime("%d/%m/%Y")) # ------------------------------------------------------ # Override ORM