diff options
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr_timesheet/models/hr_timesheet.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_timesheet/models/hr_timesheet.py b/addons/hr_timesheet/models/hr_timesheet.py index 17d4a613371..a074961e95f 100644 --- a/addons/hr_timesheet/models/hr_timesheet.py +++ b/addons/hr_timesheet/models/hr_timesheet.py @@ -152,7 +152,7 @@ class AccountAnalyticLine(models.Model): if vals.get('project_id') and not vals.get('account_id'): project = self.env['project.project'].browse(vals.get('project_id')) vals['account_id'] = project.analytic_account_id.id - vals['company_id'] = project.analytic_account_id.company_id.id + vals['company_id'] = project.analytic_account_id.company_id.id or project.company_id.id if not project.analytic_account_id.active: raise UserError(_('The project you are timesheeting on is not linked to an active analytic account. Set one on the project configuration.')) # employee implies user |
