[19.0][FIX] crm_phonecall: make the shared filters loadable again - #765
Merged
Merged
Conversation
Odoo 19.0 validates shared filters on creation: ir.filters._sanitize_shared_context() runs ast.literal_eval() on the context, and that only strips spaces and tabs. The leading newline of a multi-line context therefore raises an IndentationError and the module fails to install.
JordiMForgeFlow
approved these changes
Sep 16, 2026
HviorForgeFlow
approved these changes
Sep 16, 2026
GuillemCForgeFlow
approved these changes
Sep 16, 2026
GuillemCForgeFlow
left a comment
Contributor
There was a problem hiding this comment.
extremely easy review, thanks @MiquelRForgeFlow 🤖
pedrobaeza
reviewed
Sep 16, 2026
pedrobaeza
left a comment
Member
There was a problem hiding this comment.
Wow, ugly bug...
/ocabot merge patch
Contributor
|
This PR looks fantastic, let's merge it! |
Contributor
|
Congratulations, your PR was merged at 6051e0b. Thanks a lot for contributing to OCA. ❤️ |
MiquelRForgeFlow
referenced
this pull request
in odoo/odoo
Sep 16, 2026
A shared filter's context must be cleaned, to prevent it from polluting the contexts of other users who use the filter. Task-6461702
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.
Odoo 19.0 validates shared filters on creation: ir.filters._sanitize_shared_context() runs ast.literal_eval() on the context, and that only strips spaces and tabs. The leading newline of a multi-line context therefore raises an IndentationError and the module fails to install.
Let's write the context of the three ir.filters records on a single line, as crm_claim already does.
Error detected in #764: