odoo/odoo#162712
Created by fw-bot
Merged
at d8b0a67ca80270c2ee15eb0967421877f253d610
- label
- odoo-dev:master-saas-17.2-opw-3859440-sale_order_traceback-taqu-MrGs-fw
- head
- a20881341920f1e44c904f2d5e36ae1c97d67fe1
- target
- master
- merged
- 4 weeks ago by Tanguy Quéguineur (taqu)
- forward-port of
- odoo/odoo#162037
[FW][FIX] sale: avoid traceback when editing SO company
Issue
-----
When emptying the company field on a SO, a traceback
happens if there's no customer set as there's no currency
provided to _prepare_tax_totals (changed in 17.2 by
https://github.com/odoo/odoo/commit/ab0bdf0192120671010634978f202da35ddfc79f).
Even if the company is a required field on a SO, the
onchange will still be triggered if it is set to False,
which causes the issue here.
Fix
-----
Provide a fallback currency in case the user deletes
the company from the SO.
opw-3859440
Forward-Port-Of: odoo/odoo#162037