[REV] hr_contract: remove group on contract_id field
https://github.com/odoo/odoo/commit/fa1b4f14257ca04c85c7541fd94b19dff939626c caused an issue when a user doesn't have the `hr.group_hr_user` and has the `hr_contract.group_hr_contract_employee_manager` group. A user who doesn't have `hr.group_hr_user` can not have access to the `hr.employee`, but has access to `hr.employee.public`. The problem is that `hr.employee.public` doesn't have the `contract_id` field. opw-3148092 closes odoo/odoo#111752 X-original-commit: fa6fea0ddce67ae9a3a4244b91c2f1ea79cf3d6d Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
@@ -12,7 +12,7 @@ class Employee(models.Model):
|
||||
vehicle = fields.Char(string='Company Vehicle', groups="hr.group_hr_user")
|
||||
contract_ids = fields.One2many('hr.contract', 'employee_id', string='Employee Contracts')
|
||||
contract_id = fields.Many2one(
|
||||
'hr.contract', string='Current Contract', groups="hr.group_hr_user,hr_contract.group_hr_contract_employee_manager",
|
||||
'hr.contract', string='Current Contract', groups="hr.group_hr_user",
|
||||
domain="[('company_id', '=', company_id), ('employee_id', '=', id)]", help='Current contract of the employee')
|
||||
calendar_mismatch = fields.Boolean(related='contract_id.calendar_mismatch')
|
||||
contracts_count = fields.Integer(compute='_compute_contracts_count', string='Contract Count')
|
||||
|
||||
Reference in New Issue
Block a user