diff --git a/addons/hr_timesheet/models/project.py b/addons/hr_timesheet/models/project.py index 9230cfb48f3..e34f395b87b 100644 --- a/addons/hr_timesheet/models/project.py +++ b/addons/hr_timesheet/models/project.py @@ -22,7 +22,7 @@ class Project(models.Model): @api.onchange('analytic_account_id') def _onchange_analytic_account(self): - if not self.analytic_account_id: + if not self.analytic_account_id and self._origin: self.allow_timesheets = False @api.constrains('allow_timesheets', 'analytic_account_id')