diff --git a/addons/purchase/models/product.py b/addons/purchase/models/product.py index 49897429a4e..2de7e229044 100644 --- a/addons/purchase/models/product.py +++ b/addons/purchase/models/product.py @@ -91,3 +91,11 @@ class ProductCategory(models.Model): 'account.account', string="Price Difference Account", company_dependent=True, help="This account will be used to value price difference between purchase price and accounting cost.") + + +class SupplierInfo(models.Model): + _inherit = "product.supplierinfo" + + @api.onchange('name') + def _onchange_partner_id(self): + self.currency_id = self.name.property_purchase_currency_id or self.env.user.company_id.currency_id