summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2021-04-27 14:49:23 +0200
committerYannick Tivisse <yti@odoo.com>2021-04-27 15:02:53 +0200
commit95038cc4d6eef2937fbf3c754f0f03231f882f7b (patch)
tree9b8c887985c996ac62a1a40232e71085fca7f884 /addons
parentf118c9bbe37734d85f60016d276a7ba1a40e14fb (diff)
[FIX] hr_contract: Add index for resource_calendar_id on hr.contract
Diffstat (limited to 'addons')
-rw-r--r--addons/hr_contract/models/hr_contract.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr_contract/models/hr_contract.py b/addons/hr_contract/models/hr_contract.py
index 365f0149288..71a0107fab9 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')