[17.0][ADD] mail_template_domain: New module#176
Open
cristina-hidalgo-tecnativa wants to merge 1 commit intoOCA:17.0from
Open
[17.0][ADD] mail_template_domain: New module#176cristina-hidalgo-tecnativa wants to merge 1 commit intoOCA:17.0from
cristina-hidalgo-tecnativa wants to merge 1 commit intoOCA:17.0from
Conversation
pedrobaeza
reviewed
Apr 15, 2026
| ) | ||
|
|
||
| @api.model | ||
| def _name_search( |
Member
There was a problem hiding this comment.
Why overriding this one instead of search / _search. This one is partial. You should also put a comment as first line explaining why you override the method.
There was a problem hiding this comment.
_name_search is the entry point for Many2one widget lookups. The filter needs Python-side evaluation via filtered_domain() against the actual records, so it can't be pushed down to SQL. Overriding search/_search would apply it to all search paths (list views, programmatic calls), which is not the intended behaviour — fail-open outside the composer context is by design.
Member
|
I think you can use |
39f7f44 to
d22b054
Compare
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.
This module adds a domain filter field on mail templates so only templates matching the active record appear in the email composer dropdown.
@Tecnativa TT61914
@pedrobaeza @victoralmau