diff options
| author | IEL <iel@odoo.com> | 2020-09-28 15:28:08 +0000 |
|---|---|---|
| committer | IEL <iel@odoo.com> | 2020-10-05 17:44:11 +0000 |
| commit | 6562e3463133ac885f8b3df3d0596e3dab77c6ff (patch) | |
| tree | c5fbde4675d6f755129e8abbfd4b931f2e5588d5 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | df580bdc8fdaa33685862f2210881f19017f1daf (diff) | |
[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#59159
X-original-commit: 513cc1abe121cd05623be1a6519239f8f4b3fb48
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
