[FIX] base: res.company _company_default_get
Fix rule processing the criteria user.company_id was not honored. Closes: #4614, #7504
This commit is contained in:
parent
e61970241f
commit
8f07f01783
|
@ -232,9 +232,10 @@ class res_company(osv.osv):
|
||||||
args = [
|
args = [
|
||||||
('object_id.model', '=', object),
|
('object_id.model', '=', object),
|
||||||
('field_id', '=', field),
|
('field_id', '=', field),
|
||||||
|
('company_id', '=', self.pool['res.users']._get_company(cr, uid, context=context)),
|
||||||
]
|
]
|
||||||
|
|
||||||
ids = proxy.search(cr, uid, args, context=context)
|
ids = proxy.search(cr, uid, args, context=context, order='sequence')
|
||||||
user = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context=context)
|
user = self.pool.get('res.users').browse(cr, SUPERUSER_ID, uid, context=context)
|
||||||
for rule in proxy.browse(cr, uid, ids, context):
|
for rule in proxy.browse(cr, uid, ids, context):
|
||||||
if eval(rule.expression, {'context': context, 'user': user}):
|
if eval(rule.expression, {'context': context, 'user': user}):
|
||||||
|
|
Loading…
Reference in New Issue