diff options
| author | Yannick Tivisse <yti@odoo.com> | 2021-04-27 14:50:12 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2021-04-27 15:02:53 +0200 |
| commit | b9af2dd132a42712c47c66b11bad2e67bd392211 (patch) | |
| tree | 878244714dee9ce51503a885e737c1a50994caa2 /addons | |
| parent | 95038cc4d6eef2937fbf3c754f0f03231f882f7b (diff) | |
[FIX] hr_work_entry: Add index for work_entry_type_id on hr.work.entry
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr_work_entry/models/hr_work_entry.py | 2 |
1 files changed, 1 insertions, 1 deletions
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'), |
