Skip to content
Snippets Groups Projects
Commit 41471bb0 authored by IEL's avatar IEL
Browse files

[FIX] purchase: always switch to vendor's currency on creating a bill


Before this commit vendor's currency wasn't used on creating an invoice if there
is default journal in context. As I understand, the idea was to let onchange("journal_id")
handler to update the currency. It works well, if journal has the same currency
as specified in vendor record (res.partner). But it confuse users in following
scenario:
* there is just one vendor journal
* vendor is configured to invoice in another currency
* then, if you create invoice via "Accounting >> Overview >> Vendor Bills", it
would have journal's currency
* while, if you create invoice via "Accounting >> Vendor >> Bills", it
would have vendor's currency

This commit force to switch to vendor's currency on changing vendor field, even
if it differs from journal's currency. If after changing vendor, you set another
journal, then journal's currency is used (thanks to onchange("journal_id") handler)

opw-2339966

closes odoo/odoo#59162

X-original-commit: 513cc1abe121cd05623be1a6519239f8f4b3fb48
Signed-off-by: default avataragr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent ad77981a
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment