From 3f5fb80a76099f4aefe3e1b61aac4f014ce58f6d Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 19 Mar 2012 15:52:16 +0100 Subject: [PATCH] [FIX] res.users: proper multicompany record rule for users, courtesy of Valentin Lab Contrary to regular records, the company_id field on res_users does not represent a permanent relationship, this field is rather used by the user to select the 'company context' in which she would like to work. We don't want the list of assignable users on a task to change depending on which company these users are currently viewing data, for example. The real field that holds the list of companies a user belongs to is the 'company_ids' field. lp bug: https://launchpad.net/bugs/944813 fixed bzr revid: odo@openerp.com-20120319145216-j1t0d4zjxn9vn058 --- openerp/addons/base/res/res_security.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/addons/base/res/res_security.xml b/openerp/addons/base/res/res_security.xml index 6783e316a6c..6a2bf52d21b 100644 --- a/openerp/addons/base/res/res_security.xml +++ b/openerp/addons/base/res/res_security.xml @@ -35,8 +35,8 @@ user rule - ['|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id])] + [('company_ids','child_of',[user.company_id.id])] - +