From a3a42f335c63530cf40515467cf050d5156176aa Mon Sep 17 00:00:00 2001 From: Kevin Baptiste Date: Wed, 13 Oct 2021 14:22:47 +0000 Subject: [PATCH] [IMP] hr_contract: restrict HR Responsible to contract's company HR Responsible should be limited to the employee's of the contract's company. closes odoo/odoo#78320 Taskid: 2668125 Signed-off-by: Kevin Baptiste --- addons/hr_contract/models/hr_contract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_contract/models/hr_contract.py b/addons/hr_contract/models/hr_contract.py index 24146e75240..4e38441afae 100644 --- a/addons/hr_contract/models/hr_contract.py +++ b/addons/hr_contract/models/hr_contract.py @@ -64,7 +64,7 @@ class Contract(models.Model): visa_no = fields.Char('Visa No', related="employee_id.visa_no", readonly=False) visa_expire = fields.Date('Visa Expire Date', related="employee_id.visa_expire", readonly=False) hr_responsible_id = fields.Many2one('res.users', 'HR Responsible', tracking=True, - help='Person responsible for validating the employee\'s contracts.') + help='Person responsible for validating the employee\'s contracts.', domain="[('company_id', '=', company_id)]") calendar_mismatch = fields.Boolean(compute='_compute_calendar_mismatch') first_contract_date = fields.Date(related='employee_id.first_contract_date')