Skip to content
Permalink
Browse files

[FIX] purchase: currency of supplierinfo

Set the currency of the supplier info according to the currency set on
the partner.

opw-1951314
  • Loading branch information...
nim-odoo committed Mar 25, 2019
1 parent 11b1e12 commit a0041f0c2d0413a93ce1ae836c8bc72ebcedffb8
Showing with 8 additions and 0 deletions.
  1. +8 −0 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

0 comments on commit a0041f0

Please sign in to comment.
You can’t perform that action at this time.