Skip to content
Snippets Groups Projects
Commit 8d5c76cc authored by Nans Lefebvre's avatar Nans Lefebvre
Browse files

[FIX] purchase: use the vendor currency as default currency for vendor bills

Create a new vendor bill.
Choose a vendor with a "supplier currency" different from the company default.
The currency on the vendor bill does not change to the currency of the vendor,
unlike when a purchase order is created.

We set the currency in the partner_id onchange.

opw 1932683

closes odoo/odoo#30961
parent 3da19480
Branches
Tags
No related merge requests found
......@@ -146,6 +146,8 @@ class AccountInvoice(models.Model):
self.journal_id = default_journal_id
if self.env.context.get('default_currency_id'):
self.currency_id = self.env.context['default_currency_id']
if self.partner_id.property_purchase_currency_id:
self.currency_id = self.partner_id.property_purchase_currency_id
return res
@api.model
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment