Repository navigation
[19.0][IMP] stock_exception: fixes, demo data and docs on top of #2585 - #2
Merged
lef-adhoc merged 6 commits intoNov 25, 2026
Merged
Conversation
The state constraint runs the detection for pickings that may not be committed yet, e.g. created by a sale order confirmation. The detection then writes the exceptions through a second cursor that cannot see them, and fails with MissingError. The cron raised BaseExceptionError on the first picking with an exception. Both now store the exceptions without rolling back.
Found by odoo-lint (PO101): these msgids are no longer in the .pot, so Odoo ignores them.
The detection on the pickings now raises as soon as one of their rules applies, so the rules on the stock moves were never checked in that case: only the exceptions of the picking were shown, and a blocking rule on a move could be ignored together with them. Check the moves before raising.
Add demo rules that only apply to a demo customer on credit hold, one that warns on the picking and one that blocks on its moves, and a draft delivery to try them. Describe when the rules are checked, how to configure them, and where and with which text the exceptions are shown: the name and description of the rule, in the popup, the banner on the transfer and the list of transfers.
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.
Improvements on top of OCA#2585, to merge into its branch. Each commit stands on its own, so pick what you like.
[DO NOT MERGE] test-requirements.txt: installsbase_exceptionfrom [19.0][FWP] base_exception: forward port missing commits from 18.0 OCA/server-tools#3879. With it the CI goes green, and runboat gets the newbase_exception; with the released one the popup never shows. Drop this commit once #3879 is merged.[FIX]detect in the current transaction: these are the two fixes from my review, with tests.stateconstraint runs the detection on a picking that is not committed yet, for example one created by a sale order confirmation. As soon as a rule applies, that ends inMissingError.[FIX]check the moves when the picking has an exception:super().detect_exceptions()now raises as soon as a picking rule applies, so the move rules were never checked. Only the picking's exceptions were shown, and a blocking rule on a move could be ignored together with them. On 17.0 both were collected.[IMP]new OCA icon.[FIX].po cleanup: odoo-lint PO101 found translations of terms that are no longer in the .pot.[IMP]demo data and docs.All 7 tests pass locally against #3879, and I checked the demo flow by hand: warning, ignore, then blocking.
pre-commitandodoo-lintare clean.Not changed, but worth a look: after Ignore Exceptions in the popup, the wizard always calls
action_confirm(). When the popup came from Validate, the transfer is not validated, and the user has to click Validate again. The USAGE text describes the current behaviour.