[18.0][FIX] base_tier_validation: use validation_status for readonly domain#1246
Open
[18.0][FIX] base_tier_validation: use validation_status for readonly domain#1246
Conversation
The `_get_tier_validation_readonly_domain` method returns
`bool(review_ids)` which is injected as a readonly domain modifier on
all form fields via `get_view()`. In Odoo 18, the web client does not
always include One2many fields like `review_ids` in the data spec during
form re-renders (e.g. after a status change or button click), causing an
OWL rendering error:
Name 'review_ids' is not defined
Replace the domain with `validation_status not in ('no', False)` which
uses the stored computed `validation_status` Selection field instead.
This field is always available in the form data spec and provides the
same semantics: fields become readonly when a validation process is
active (pending, approved, or rejected).
Contributor
|
Hi @LoisRForgeFlow, |
StefanRijnhart
approved these changes
Mar 4, 2026
Saran440
approved these changes
Mar 6, 2026
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.
Description
The
_get_tier_validation_readonly_domainmethod currently returnsbool(review_ids)which is injected as a readonly domain modifier on all form fields viaget_view().In Odoo 18, the web client does not always include One2many fields like
review_idsin the data spec during form re-renders (e.g. after a status change or button click), causing an OWL rendering error:This happens for example when cancelling a sale order that has tier validation configured.
Fix
Replace the readonly domain with
validation_status not in ('no', False)which uses the stored computedvalidation_statusSelection field instead. This field is always available in the form data spec and provides the same semantics: fields become readonly when a validation process is active (pending, approved, or rejected).The
validation_statusfield is already defined on thetier.validationmixin with values:no,pending,approved,rejected.