feat: add company_ids field to hr.employee.public to support multi-company visibility
This commit is contained in:
parent
b45364a528
commit
842c6bcbdf
@ -66,3 +66,14 @@ class HrEmployee(models.Model):
|
|||||||
if domain:
|
if domain:
|
||||||
domain = replace_company_leaf(domain)
|
domain = replace_company_leaf(domain)
|
||||||
return super()._search(domain, offset=offset, limit=limit, order=order, **kwargs)
|
return super()._search(domain, offset=offset, limit=limit, order=order, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
class HrEmployeePublic(models.Model):
|
||||||
|
_inherit = 'hr.employee.public'
|
||||||
|
|
||||||
|
company_ids = fields.Many2many(
|
||||||
|
'res.company',
|
||||||
|
related='employee_id.company_ids',
|
||||||
|
readonly=True,
|
||||||
|
string='Branches'
|
||||||
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user