Skip to content

[19.0][MIG]: web_m2x_options_manager#3393

Open
Alexgars73 wants to merge 27 commits intoOCA:19.0from
Studio73:19.0-mig-web_m2x_options_manager
Open

[19.0][MIG]: web_m2x_options_manager#3393
Alexgars73 wants to merge 27 commits intoOCA:19.0from
Studio73:19.0-mig-web_m2x_options_manager

Conversation

@Alexgars73
Copy link
Copy Markdown

@Alexgars73 Alexgars73 commented Dec 15, 2025

Changes:

Options create and create_edit are deprecated, changed to no_create and no_create_edit

SilvioC2C and others added 25 commits December 4, 2025 09:23
Currently translated at 76.4% (26 of 34 strings)

Translation: web-14.0/web-14.0-web_m2x_options_manager
Translate-URL: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_m2x_options_manager/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-14.0/web-14.0-web_m2x_options_manager
Translate-URL: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_m2x_options_manager/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: web-14.0/web-14.0-web_m2x_options_manager
Translate-URL: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_m2x_options_manager/
Currently translated at 100.0% (33 of 33 strings)

Translation: web-14.0/web-14.0-web_m2x_options_manager
Translate-URL: https://translation.odoo-community.org/projects/web-14-0/web-14-0-web_m2x_options_manager/it/
Field ``option_create_edit_wizard`` has been dropped in the migration: the pop-up wizard does not exist anymore, so the field has no use
@Alexgars73 Alexgars73 force-pushed the 19.0-mig-web_m2x_options_manager branch 2 times, most recently from 2fc3939 to 353614b Compare December 15, 2025 14:47
@Alexgars73 Alexgars73 force-pushed the 19.0-mig-web_m2x_options_manager branch from 353614b to 4efacbe Compare December 15, 2025 14:48
Copy link
Copy Markdown

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

I did a quick test by adding this rule and checking I can't create customers in sales but I was able to do that

image

@Alexgars73 Alexgars73 force-pushed the 19.0-mig-web_m2x_options_manager branch from 4efacbe to c97bc39 Compare January 2, 2026 10:02
@Alexgars73
Copy link
Copy Markdown
Author

@AaronHForgeFlow I've tested it and it seems the problem was because the runboat hadn't been updated with the latest changes to the module that depends on web_m2x_options. If you can try it now, thanks.

Copy link
Copy Markdown

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

Functional tests 👍

@phuctranfxvn
Copy link
Copy Markdown
Contributor

Hello @AaronHForgeFlow do you have any update for this PR?

@AaronHForgeFlow
Copy link
Copy Markdown

@phuctranfxvn I approved it, that's all I can do :) if you review it it'll help

Copy link
Copy Markdown
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Thanks for the migration, looks good overall.

The model restructuring is well thought out -- making model_id a related field from field_id.model_id instead of a separate required field simplifies the data model and the constraint correctly narrows from unique(field_id, model_id) to unique(field_id).

The option key migration from create/create_edit to no_create/no_create_edit in _read_own_options / _apply_options is correctly implemented with the proper boolean inversion logic.

Cache clearing properly updated from the old type(self)._get.clear_cache() to self.env.registry.clear_cache() with named caches (default, templates). The ormcache on _get_id also correctly specifies cache="default".

Good additions: can_have_options and comodel_id computed stored fields on ir.model.fields with a pre_init_hook for performance on large databases, and the comodel-based option management via the ir.model form view.

One minor note: the module's own view XML (m2x_create_edit_option_form and m2x_create_edit_option_list_editable) still uses the old-style {'create': False, 'create_edit': False} options on the field_id widget, while the test fixtures and the module's logic itself already use the 19.0 no_create/no_create_edit naming. Not blocking since both forms are likely handled, but updating to {'no_create': True, 'no_create_edit': True} would be consistent.

The CI Detect unreleased dependencies failure is expected -- web_m2x_options and base_view_inheritance_extension are referenced from their PR branches in test-requirements.txt, which resolves once those merge.

@yankinmax
Copy link
Copy Markdown
Contributor

Hello @Alexgars73 , as the dependency PR is merged now, can you pls rebase this one and ping for a merge?
Thanks in advance!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.