From 7b1a894573b1499e9ea563f500c866378a65e1ca Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 1 Aug 2019 09:18:56 +0000 Subject: [PATCH] [FIX] hr: Multi company issue with hr.employee Steps to reproduce the bug: - Set your user in multi company - Create two companies C1 and C2 where C2 is a child of C1 - Create a job position JP in company C2 - Create an employee E in company C2 - Log in company C1 - Try to archive E Bug: An access error was raised due to ir.rule "Job multi company rule" saying that you can only see the job position in your company or in your company's childs. The same logic must be applied for the hr.employee to avoid access rights error in multi company. opw:2044018 closes odoo/odoo#35370 Signed-off-by: Simon Goffin (sig) --- addons/hr/security/hr_security.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml index 09e16244846..3a29801923f 100644 --- a/addons/hr/security/hr_security.xml +++ b/addons/hr/security/hr_security.xml @@ -35,5 +35,12 @@ ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + + Employee multi company rule + + + ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])] + +