[FIX] hr_contract: Add index for resource_calendar_id on hr.contract

X-original-commit: 8f174020d2dc8f8de81fe0c52e6fbba5c527a8a3
This commit is contained in:
Yannick Tivisse
2021-04-28 19:36:23 +02:00
parent 6f998adc3b
commit 14fa57788d
+1 -1
View File
@@ -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')