From ab60d773eb84a527b3167d7efaf169f70c5c9786 Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Thu, 22 Feb 2018 17:01:50 +0100 Subject: [PATCH] [FIX] hr_timesheet_sheet: set default company on the company instead of department Code is explicit enough ... Closes #23120 --- addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py index 62f4685a84b..d560569d669 100644 --- a/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/models/hr_timesheet_sheet.py @@ -68,9 +68,8 @@ class HrTimesheetSheet(models.Model): '\n* The \'Waiting Approval\' status is used to confirm the timesheet by user. ' '\n* The \'Approved\' status is used when the users timesheet is accepted by his/her senior.') account_ids = fields.One2many('hr_timesheet_sheet.sheet.account', 'sheet_id', string='Analytic accounts', readonly=True) - company_id = fields.Many2one('res.company', string='Company') - department_id = fields.Many2one('hr.department', string='Department', - default=lambda self: self.env['res.company']._company_default_get()) + company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env['res.company']._company_default_get()) + department_id = fields.Many2one('hr.department', string='Department') @api.constrains('date_to', 'date_from', 'employee_id') def _check_sheet_date(self, forced_user_id=False):