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

closes #32098

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
  • Loading branch information...
nim-odoo committed Mar 25, 2019
1 parent 11b1e12 commit b8950ab49a1176bc33a7180d327cbf32f4dbccdd
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 b8950ab

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