diff --git a/odoo/models.py b/odoo/models.py index aabc365d03b..a2499c6a68d 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -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))