From ca5ba6a957d1001be611b4f0208828fa1a90279f Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Tue, 27 Apr 2021 14:50:12 +0200 Subject: [PATCH] [FIX] hr_work_entry: Add index for work_entry_type_id on hr.work.entry X-original-commit: 562bfcdb107ef8871dd31ee9601770143aceaf98 --- addons/hr_work_entry/models/hr_work_entry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_work_entry/models/hr_work_entry.py b/addons/hr_work_entry/models/hr_work_entry.py index 8368d0c5750..cf229a51680 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'),