Skip to content

Conversation

@ALopez-Adhoc
Copy link

No description provided.

CarlosRoca13 and others added 29 commits January 9, 2026 14:54
… to 15.0

[UPD] Update website_sale_product_attribute_value_filter_existing.pot
…nature

match the function signature of shop with the original one from
website_sale, to avoid potential issues with other modules overwriting
the function and passing unexpected parameters
…to check the real functionality of the module

TT45590
…ormance improvement

- Switch to setUpClass for avoiding repeat the same setup for each test.
- Include context keys for avoiding mail operations overhead.
…ibute parent container

If only the attribute container is hidden, the parent container still occupies a space that is visible in the attribute list. To avoid this, apply the condition to the parent container and hide it completely.

TT50704
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: e-commerce-18.0/e-commerce-18.0-website_sale_product_attribute_value_filter_existing
Translate-URL: https://translation.odoo-community.org/projects/e-commerce-18-0/e-commerce-18-0-website_sale_product_attribute_value_filter_existing/
…erformance using ID sets

The overhead of extending the entire "shop()" method is eliminated and
the logic is moved to "_get_additional_extra_shop_values()",
the hook provided by Odoo to add data to the context without duplicating
core code.

In addition, the filtering of unused values is optimized by avoiding
the intersection of recordsets in QWeb ("attr_values_used & v").
Instead, the IDs of used values are precomputed as a set
("attr_values_used_ids") and the templates check "v.id in attr_values_used_ids",
which drastically reduces the cost per iteration.
Copilot AI review requested due to automatic review settings January 12, 2026 21:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request migrates the website_sale_product_attribute_value_filter_existing module from version 18.0 to 19.0. The module extends the website sale functionality to filter and display only product attribute values that are actually used in product variants, hiding unused attribute values from the filter panel.

Changes:

  • Updated module version to 19.0.1.0.0 in the manifest
  • Migrated all module files including controllers, templates, tests, and documentation
  • Added JavaScript tour tests for verifying attribute filtering behavior

Reviewed changes

Copilot reviewed 19 out of 24 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
__manifest__.py Updated version to 19.0.1.0.0 and configured assets for test tours
controllers/main.py Controller that computes used attribute values for filtering
views/templates.xml Template overrides to conditionally show attribute values based on usage
tests/test_website_sale_product_attribute_value_filter_existing.py HTTP test cases for validating attribute filtering
static/src/js/website_sale_product_attribute_value_filter_existing_tour.esm.js JavaScript tour for testing basic attribute filtering
static/src/js/website_sale_product_attribute_value_filter_existing_search_desk_tour.esm.js JavaScript tour for testing attribute filtering with search
i18n/*.po Translation files for multiple languages
Various documentation files README, description, configuration, and contributor information

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ALopez-Adhoc ALopez-Adhoc force-pushed the 19.0-mig-website_sale_product_attribute_value_filter_existing branch from b307c42 to cfebc21 Compare January 12, 2026 22:31
@ALopez-Adhoc ALopez-Adhoc force-pushed the 19.0-mig-website_sale_product_attribute_value_filter_existing branch from cfebc21 to eac2057 Compare January 16, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.