Skip to content

[18.0][MIG] base_name_search_multi_lang: Migration to 18.0 - #3697

Open
ROBBYHOOD9 wants to merge 14 commits into
OCA:18.0from
ecosoft-odoo:18.0-mig-base_name_search_multi_lang
Open

[18.0][MIG] base_name_search_multi_lang: Migration to 18.0#3697
ROBBYHOOD9 wants to merge 14 commits into
OCA:18.0from
ecosoft-odoo:18.0-mig-base_name_search_multi_lang

Conversation

@ROBBYHOOD9

Copy link
Copy Markdown

Migration base_name_search_multi_lang from 14.0 to 18.0

1. Module Version

Updated the module version to align with Odoo 18.

2. Python Code Updates

  • Replaced the deprecated name_search patching mechanism with _search_display_name().
  • Updated the multi-language search implementation to comply with Odoo 18 APIs.

3. View Migration

  • Updated the XPath expression to match the Odoo 18 view structure.

4. Test Updates

  • Updated tests to use BaseCommon and Odoo 18 testing conventions.

5. Project Maintenance

  • Applied pre-commit fixes and updated project configuration files.

@OCA-git-bot OCA-git-bot added series:18.0 mod:base_name_search_multi_lang Module base_name_search_multi_lang labels Aug 7, 2026
Comment thread base_name_search_multi_lang/models/ir_model.py Outdated
Comment thread base_name_search_multi_lang/readme/DESCRIPTION.md Outdated
Comment thread base_name_search_multi_lang/readme/DESCRIPTION.md Outdated
Comment thread base_name_search_multi_lang/readme/DESCRIPTION.md Outdated
Comment thread base_name_search_multi_lang/readme/DESCRIPTION.md Outdated
Comment thread base_name_search_multi_lang/readme/USAGE.md Outdated
Comment thread base_name_search_multi_lang/models/ir_model.py Outdated
Comment thread base_name_search_multi_lang/models/ir_model.py Outdated
@ROBBYHOOD9
ROBBYHOOD9 force-pushed the 18.0-mig-base_name_search_multi_lang branch from 01c5beb to 183c99f Compare August 27, 2026 15:31
@ROBBYHOOD9

Copy link
Copy Markdown
Author

@hbrunn
Thanks for the review and the suggestions. I’ve reworked the implementation based on the comments:

  • Fixed the handling of negative term operators. A record is now excluded if the translated value matches the search term in any installed language.
  • Added a test for negative operators.
  • Moved the helper to models/base.py and kept ir_model.py only for the field and cache invalidation.
  • Applied the README and documentation suggestions.
  • Changed the implementation from _search_display_name to _condition_to_sql. I remember that the 14.0 version also supported searching translated values from the main search bar, so I changed this to _condition_to_sql to support the same behaviour in 18.0.

@hbrunn hbrunn left a comment

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.

this entirely changes the logic of the module. the goal here is to change name_search, not inject unexpected behavior for arbitrary searches.

Further, this needs to conform to https://github.com/OCA/.github/blob/master/AI_POLICY.md

I'll refrain from continuing to review this if you keep submitting unsupervised generated bullshit.

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

Labels

mod:base_name_search_multi_lang Module base_name_search_multi_lang series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants