[FIX] purchase: currency of supplierinfo
Set the currency of the supplier info according to the currency set on the partner. opw-1951314 closes odoo/odoo#32098 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user