[19.0][FIX] server_environment: add search support for env-computed fields - #278
Open
AungKoKoLin1997 wants to merge 1 commit into
Open
[19.0][FIX] server_environment: add search support for env-computed fields#278AungKoKoLin1997 wants to merge 1 commit into
AungKoKoLin1997 wants to merge 1 commit into
Conversation
AungKoKoLin1997
force-pushed
the
19.0-fix-server-env-search
branch
from
July 22, 2026 08:55
6cf2396 to
7ea5b66
Compare
When server_environment transforms a field to an env-computed field, it sets store=False but does not provide a search method. This makes the field unusable in domain filters, raising: ValueError: Cannot convert <field> to SQL because it is not stored This was not an issue before Odoo 19 because the old domain processing (osv.expression) handled non-stored fields more leniently. Odoo 19's rewritten domain engine (odoo.orm.domains) strictly requires either store=True or an explicit search method. Add a search method for env-computed fields following the same _partialmethod pattern already used for the inverse method.
AungKoKoLin1997
force-pushed
the
19.0-fix-server-env-search
branch
from
July 24, 2026 03:07
7ea5b66 to
8f9c9aa
Compare
AungKoKoLin1997
marked this pull request as ready for review
July 24, 2026 03:07
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.
Summary
When
server_environmenttransforms a field to an env-computed field, it setsstore=Falsebut does not provide asearchmethod. This makes the field unusable in domain filters, e.g.:raises:
This was not an issue before Odoo 19 because the old domain processing (
osv.expression) handled non-stored fields more leniently. Odoo 19's rewritten domain engine (odoo.orm.domains) strictly requires eitherstore=Trueor an explicitsearchmethod.Fix
Add a
searchmethod for env-computed fields following the same_partialmethodpattern already used for theinversemethod.@qrtl QT7028