Skip to content

[19.0][MIG] website_sale_product_attribute_filter_category: Migration to version 19.0 - #1295

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

[19.0][MIG] website_sale_product_attribute_filter_category: Migration to version 19.0#1295
cristina-hidalgo-tecnativa wants to merge 30 commits into
OCA:19.0from
Tecnativa:19.0-mig-website_sale_product_attribute_filter_category

Conversation

@cristina-hidalgo-tecnativa

Copy link
Copy Markdown
Contributor
  • Reimplement the "Group by categories" toggle as an Owl Website Builder option (ProductsListPageOption extension) instead of the removed we-checkbox.
  • Move the category-grouping xpath from products_attributes to product_attribute_filters_form, keeping the same $0-replace technique, with unique ids per category to avoid collisions between the sidebar and offcanvas renders.
  • Update shop() override to match the new core signature and param names; use request.env._() per current translation convention.
  • Update tour and tests accordingly.

@Tecnativa TT64160
@pedrobaeza @pilarvargas-tecnativa

sergio-teruel and others added 19 commits August 19, 2026 07:49
Translated using Weblate (Finnish)

Currently translated at 100.0% (6 of 6 strings)

Translation: e-commerce-12.0/e-commerce-12.0-website_sale_attribute_filter_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-12-0/e-commerce-12-0-website_sale_attribute_filter_category/fi/
Currently translated at 100.0% (4 of 4 strings)

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

Translation: e-commerce-13.0/e-commerce-13.0-website_sale_attribute_filter_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-13-0/e-commerce-13-0-website_sale_attribute_filter_category/ca/
…ttribute_filter_category: Migration to version 15.0

TT37008
…utes_collapsible template + migration script

TT41345
Currently translated at 100.0% (4 of 4 strings)

Translation: e-commerce-15.0/e-commerce-15.0-website_sale_product_attribute_filter_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_product_attribute_filter_category/es/
@OCA-git-bot OCA-git-bot added series:19.0 mod:website_sale_product_attribute_filter_category Module website_sale_product_attribute_filter_category labels Aug 19, 2026
mymage and others added 9 commits August 19, 2026 10:33
Currently translated at 75.0% (3 of 4 strings)

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

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

Translation: e-commerce-18.0/e-commerce-18.0-website_sale_product_attribute_filter_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_product_attribute_filter_category/es/
Currently translated at 25.0% (1 of 4 strings)

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

Translation: e-commerce-18.0/e-commerce-18.0-website_sale_product_attribute_filter_category
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_product_attribute_filter_category/it/
@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration website_sale_product_attribute_filter_category

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Aug 19, 2026
@cristina-hidalgo-tecnativa
cristina-hidalgo-tecnativa force-pushed the 19.0-mig-website_sale_product_attribute_filter_category branch from 473c3d9 to 1e7dccf Compare August 19, 2026 08:33
@OCA-git-bot OCA-git-bot mentioned this pull request Aug 19, 2026
35 tasks
@cristina-hidalgo-tecnativa
cristina-hidalgo-tecnativa force-pushed the 19.0-mig-website_sale_product_attribute_filter_category branch from 1e7dccf to 8364e99 Compare August 19, 2026 08:46

@pedrobaeza pedrobaeza 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.

On a test in runboat, grouping by category duplicates children filters:

Image

Other thing about migrating DBs: those with this option enabled in previous version, will it be kept in this one, or a migration script should handle it?

<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">

<t

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.

Incorrect indentation, and don't leave empty lines

@cristina-hidalgo-tecnativa
cristina-hidalgo-tecnativa force-pushed the 19.0-mig-website_sale_product_attribute_filter_category branch from 8364e99 to 071e01f Compare August 19, 2026 11:10
@cristina-hidalgo-tecnativa

Copy link
Copy Markdown
Contributor Author

On a test in runboat, grouping by category duplicates children filters:
Image

Other thing about migrating DBs: those with this option enabled in previous version, will it be kept in this one, or a migration script should handle it?

Could you please review it again?

About the question, no migration script is needed. When updating an existing <template> record (not a fresh install), odoo/tools/convert.py (_tag_template) explicitly skips re-writing the active field if the view already exists.

So a DB that had "Group by categories" enabled in 18.0 keeps it enabled after upgrading — only inherit_id gets repointed to the new product_attribute_filters_form.

@pedrobaeza pedrobaeza 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.

OK, now it works correctly on runboat, although 2 observations:

  • The slider is not next to "Collapse sidebar sections", which is related.
  • The new categories are collapsible by default, not respecting this other option.

And about migration, I'm still not sure, as if the previous view was active in 17/18, then when migrating, it's kept with noupdate=1, and not getting the new view spec. Let's see if @pilarvargas-tecnativa can confirm.

@pilarvargas-tecnativa

Copy link
Copy Markdown
Contributor

This is one of the views that are duplicated when they are specifically enabled for a website. Those copies associated with the website are not updated when the module is updated; only the original view is updated. Therefore, I believe a migration script with website context would indeed be necessary.

@pedrobaeza

Copy link
Copy Markdown
Member

I think this is a general problem for any activable view. We can try to mark all of those views to check if they are the same as the website_id=null ones, and if so, then update them after the migration with the new content of the agnostic view.

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

Labels

mod:website_sale_product_attribute_filter_category Module website_sale_product_attribute_filter_category series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.