Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FW][FIX] sale: avoid traceback when editing SO company #162712

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 19, 2024

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
ab0bdf0).
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: #162037

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
ab0bdf0).
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

X-original-commit: 422261b
@robodoo
Copy link
Contributor

robodoo commented Apr 19, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 19, 2024

@taqu-odoo this PR targets master and is the last of the forward-port chain.

To merge the full chain, use

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 19, 2024
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Apr 19, 2024
@taqu-odoo
Copy link
Contributor

@fw-bot r+

robodoo pushed a commit that referenced this pull request Apr 22, 2024
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
ab0bdf0).
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

closes #162712

X-original-commit: 422261b
Signed-off-by: Tanguy Quéguineur (taqu) <taqu@odoo.com>
@robodoo robodoo closed this Apr 22, 2024
@robodoo robodoo added the 17.3 label Apr 22, 2024
zel-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Apr 29, 2024
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
ab0bdf0).
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

closes odoo#162712

X-original-commit: 422261b
Signed-off-by: Tanguy Quéguineur (taqu) <taqu@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
17.3 forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants