[IMP] model.py: Don't erase 'allowed_company_id' on with_context with args
This commit is contained in:
@@ -4838,6 +4838,8 @@ Fields:
|
||||
|
||||
The returned recordset has the same prefetch object as ``self``.
|
||||
"""
|
||||
if args and 'allowed_company_ids' not in args[0] and 'allowed_company_ids' in self._context:
|
||||
args[0]['allowed_company_ids'] = self._context.get('allowed_company_ids')
|
||||
context = dict(args[0] if args else self._context, **kwargs)
|
||||
return self.with_env(self.env(context=context))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user