Skip to content

[19.0][MIG] website_snippet_product_category: Migration to version 19.0 - #1288

Open
cristina-hidalgo-tecnativa wants to merge 35 commits into
OCA:19.0from
Tecnativa:19.0-mig-website_snippet_product_category
Open

[19.0][MIG] website_snippet_product_category: Migration to version 19.0#1288
cristina-hidalgo-tecnativa wants to merge 35 commits into
OCA:19.0from
Tecnativa:19.0-mig-website_snippet_product_category

Conversation

@cristina-hidalgo-tecnativa

Copy link
Copy Markdown
  • Rewrited the frontend widget from sAnimation (removed in 19.0) to the new Interaction API.
  • Replaced the old snippet options system (web_editor, removed) with the new Builder Plugin API: the save-cleanup logic moves to clean_for_save_handlers, which also makes the s_product_category_options template (it inherited website.snippet_options, also removed) unnecessary and lets us drop it.
  • @route(type="json")@route(type="jsonrpc") (deprecated alias in 19.0).

@Tecnativa TT64172
@pedrobaeza @pilarvargas-tecnativa

@OCA-git-bot OCA-git-bot added series:19.0 mod:website_snippet_product_category Module website_snippet_product_category labels Aug 17, 2026
@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration website_snippet_product_category

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Aug 17, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Aug 17, 2026
29 tasks
@pilarvargas-tecnativa

Copy link
Copy Markdown
Contributor

Please reduce administrative commits

claudiagn and others added 21 commits August 17, 2026 12:09
…site.page

Bulk changes shouldn't be applied indiscriminately to all places.
Currently translated at 100.0% (10 of 10 strings)

Translation: e-commerce-13.0/e-commerce-13.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_snippet_product_category/ca/
Currently translated at 100.0% (10 of 10 strings)

Translation: e-commerce-13.0/e-commerce-13.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_snippet_product_category/es/
Currently translated at 100.0% (10 of 10 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/it/
Currently translated at 80.0% (8 of 10 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/fr/
weblate and others added 10 commits August 17, 2026 12:09
Currently translated at 20.0% (2 of 10 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/nl/
Currently translated at 90.0% (9 of 10 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/ca/
Currently translated at 0.0% (0 of 10 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/pt_BR/
Currently translated at 90.0% (9 of 10 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/es/
Currently translated at 100.0% (10 of 10 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/it/
Currently translated at 100.0% (10 of 10 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/es/
Currently translated at 100.0% (13 of 13 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/ca/
Currently translated at 100.0% (13 of 13 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/it/
Currently translated at 100.0% (13 of 13 strings)

Translation: e-commerce-18.0/e-commerce-18.0-website_snippet_product_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_snippet_product_category/es/
@cristina-hidalgo-tecnativa
cristina-hidalgo-tecnativa force-pushed the 19.0-mig-website_snippet_product_category branch from e6591a2 to c416fc3 Compare August 17, 2026 10:10
@cristina-hidalgo-tecnativa

Copy link
Copy Markdown
Author

Please reduce administrative commits

Done!

@ivantodorovich ivantodorovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LG

Comment thread website_snippet_product_category/i18n/ca.po Outdated
Comment thread website_snippet_product_category/static/src/js/frontend.esm.js Outdated
Comment thread website_snippet_product_category/static/src/js/frontend.esm.js Outdated
Comment thread website_snippet_product_category/static/src/js/frontend.esm.js
};

cleanForSave({root}) {
for (const el of root.querySelectorAll(".js_product_category")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The previous implementation only cleaned the current option target (this.$target.empty()). Why do we now clean every .js_product_category under root? Please avoid broadening the behavior unless required by the new builder API.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I found this one is required by the new API, not a behavior broadening: clean_for_save_handlers in the new Builder Plugin system is registered once globally and only receives the whole editable root, not a per-instance target like the old options system did.

Iterating root.querySelectorAll(...) is the standard pattern the core itself uses for this exact case (e.g. popup_visibility_plugin.js, embed_code_option_plugin.js both do the same).

Without the loop, a page with more than one instance of this snippet would only get the first one cleaned on save.

@cristina-hidalgo-tecnativa
cristina-hidalgo-tecnativa force-pushed the 19.0-mig-website_snippet_product_category branch from c416fc3 to e176945 Compare August 18, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:website_snippet_product_category Module website_snippet_product_category series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.