Conversation
Contributor
|
Hi @hparfr, @sebastienbeau, |
Contributor
Author
|
@grindtildeath could you take a look? This follows up on #3590 and OCA/sale-workflow#4255, so you are the one with the context. The dialog can now confirm the record, and closing it leaves the view showing the previous state. Reloading on close seemed like the smallest fix |
The dialog can confirm the record (ticking "Ignore Exceptions" calls action_confirm on it), but closing it only closes the dialog: the view underneath keeps showing the record as it was before, so the user sees a quotation that is already a sales order. Reload once the dialog closes.
lef-adhoc
force-pushed
the
18.0-t-75452-lef
branch
from
September 18, 2026 20:05
cd33a21 to
c97fa01
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
Confirm a sales order that hits an exception rule. The dialog shows up, you tick Ignore Exceptions and confirm.
The order is confirmed — but the view behind the dialog still shows it as a quotation, with the red exception banner and the Confirm button. You have to reload the page by hand to see the real state, and until you do you can hit Confirm again on an order that is already confirmed.
How to reproduce
On 18.0 with
sale_exceptioninstalled:exception.ruleonsale.order,by_py_code, that matches one customer.salein the database. Reload the page and the real state appears.Why
The dialog can change the record: ticking "Ignore Exceptions" calls
action_confirmon it. But the wizard returnsir.actions.act_window_close, which closes the dialog and nothing else, so the view keeps the state it had before.The fix
Reload once the dialog is closed, using the
onCloseoption ofdoAction:It goes here rather than in the wizard's return value for two reasons:
action_confirmon the wizard is inherited by several modules, and this way the fix covers every model using the mechanism, not just sales.