diff --git a/addons/hr_contract/models/hr_contract.py b/addons/hr_contract/models/hr_contract.py index eda744d43f3..753484d403b 100644 --- a/addons/hr_contract/models/hr_contract.py +++ b/addons/hr_contract/models/hr_contract.py @@ -30,7 +30,7 @@ class Contract(models.Model): help="End date of the trial period (if there is one).") resource_calendar_id = fields.Many2one( 'resource.calendar', 'Working Schedule', compute='_compute_employee_contract', store=True, readonly=False, - default=lambda self: self.env.company.resource_calendar_id.id, copy=False, + default=lambda self: self.env.company.resource_calendar_id.id, copy=False, index=True, domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]") wage = fields.Monetary('Wage', required=True, tracking=True, help="Employee's monthly gross wage.") notes = fields.Text('Notes')