diff --git a/product_supplierinfo_intercompany/models/product_intercompany_supplier_mixin.py b/product_supplierinfo_intercompany/models/product_intercompany_supplier_mixin.py index 91091ec9385..06e89bbc844 100644 --- a/product_supplierinfo_intercompany/models/product_intercompany_supplier_mixin.py +++ b/product_supplierinfo_intercompany/models/product_intercompany_supplier_mixin.py @@ -38,8 +38,10 @@ def _synchronise_supplier_info(self, pricelists=None): ) # We pass the pricelist in the context in order to get the right # sale price on record.price (compatible v8 to v12) - for record in self.sudo().with_context( - pricelist=pricelist.id, automatic_intercompany_sync=True + for record in ( + self.sudo() + .with_context(pricelist=pricelist.id, automatic_intercompany_sync=True) + .with_company(pricelist.company_id) ): domain = record._get_intercompany_supplier_info_domain(pricelist) supplierinfo = record.env["product.supplierinfo"].search(domain)