mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[FIX] timesheet_exception: modify code to check "validated" is set in "vals"
H11047
This commit is contained in:
@@ -34,10 +34,10 @@ class AnalyticLine(models.Model):
|
||||
def _reverse_field(self):
|
||||
return 'timesheet_ids'
|
||||
|
||||
def write(self, vals):
|
||||
def write(self, vals):
|
||||
if not vals.get('ignore_exception'):
|
||||
for timesheet in self:
|
||||
if timesheet.detect_exceptions() and 'stage_id' in vals:
|
||||
for timesheet in self:
|
||||
if timesheet.with_context(newVals=vals).detect_exceptions():
|
||||
return self._popup_exceptions()
|
||||
return super().write(vals)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user