Skip to content

[19.0][FIX] base_comment_template: comment_template_ids domain#1167

Open
Qlasta wants to merge 1 commit into
OCA:19.0from
versada:19.0-fix-base_comment_template-domain
Open

[19.0][FIX] base_comment_template: comment_template_ids domain#1167
Qlasta wants to merge 1 commit into
OCA:19.0from
versada:19.0-fix-base_comment_template-domain

Conversation

@Qlasta

@Qlasta Qlasta commented Jun 3, 2026

Copy link
Copy Markdown

The field filtered candidates by comparing the computed, non-stored relational field against a model name string:

domain=lambda self: [(model_ids, in, self._name)]

The 19.0 domain engine (odoo.fields.Domain) rewrites a relational-vs- scalar leaf into the operator with a sub-domain on the comodel:

(model_ids, any, [(display_name, in, [account.asset])])

Build the domain from _search_model_ids instead.

The field filtered candidates by comparing the computed, non-stored
relational field  against a model name string:

    domain=lambda self: [(model_ids, in, self._name)]

The 19.0 domain engine () rewrites a relational-vs-
scalar leaf into the  operator with a sub-domain on the comodel:

    (model_ids, any, [(display_name, in, [account.asset])])

Build the domain from  instead.
@OCA-git-bot OCA-git-bot added series:19.0 mod:base_comment_template Module base_comment_template labels Jun 3, 2026

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza pedrobaeza added this to the 19.0 milestone Jun 25, 2026
Comment on lines +29 to +31
domain=lambda self: self.env["base.comment.template"]._search_model_ids(
"in", self._name
),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be just?:

Suggested change
domain=lambda self: self.env["base.comment.template"]._search_model_ids(
"in", self._name
),
domain=lambda self: [("model_ids", "=", self._name)],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants