summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/hr_contract/models/hr_contract.py2
-rw-r--r--addons/hr_work_entry/models/hr_work_entry.py2
2 files changed, 2 insertions, 2 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')
diff --git a/addons/hr_work_entry/models/hr_work_entry.py b/addons/hr_work_entry/models/hr_work_entry.py
index 9f4344705d8..9db54e702bb 100644
--- a/addons/hr_work_entry/models/hr_work_entry.py
+++ b/addons/hr_work_entry/models/hr_work_entry.py
@@ -19,7 +19,7 @@ class HrWorkEntry(models.Model):
date_start = fields.Datetime(required=True, string='From')
date_stop = fields.Datetime(compute='_compute_date_stop', store=True, readonly=False, string='To')
duration = fields.Float(compute='_compute_duration', store=True, string="Period")
- work_entry_type_id = fields.Many2one('hr.work.entry.type')
+ work_entry_type_id = fields.Many2one('hr.work.entry.type', index=True)
color = fields.Integer(related='work_entry_type_id.color', readonly=True)
state = fields.Selection([
('draft', 'Draft'),