summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorOdoo's Mergebot <robodoo@odoo.com>2021-04-28 09:40:45 +0200
committerGitHub <noreply@github.com>2021-04-28 09:40:45 +0200
commit4f8b2da26c8e1318a977a1f330dc52256fcd48cf (patch)
treea31cf1ccbcf6cb26a0aaef2c1c3e54356bfcab45 /addons
parentbac2802212020648712b0ddb1430974f933c2744 (diff)
parentb9af2dd132a42712c47c66b11bad2e67bd392211 (diff)
m
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr closes odoo/odoo#69927 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons')
-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'),