Skip to content

[19.0][MIG] website_attribute_set#229

Open
bosd wants to merge 24 commits intoOCA:19.0from
bosd:19.0-mig-website_attribute_set
Open

[19.0][MIG] website_attribute_set#229
bosd wants to merge 24 commits intoOCA:19.0from
bosd:19.0-mig-website_attribute_set

Conversation

@bosd
Copy link
Copy Markdown

@bosd bosd commented Nov 21, 2025

depends on #232

@bosd bosd force-pushed the 19.0-mig-website_attribute_set branch from bafb5ad to 179cbff Compare November 22, 2025 00:36
@bosd bosd force-pushed the 19.0-mig-website_attribute_set branch from af45293 to bb53bcf Compare December 21, 2025 17:19
@bosd bosd marked this pull request as ready for review December 21, 2025 17:23
@bosd bosd marked this pull request as draft December 24, 2025 13:08
@bosd bosd force-pushed the 19.0-mig-website_attribute_set branch 9 times, most recently from 7f35302 to 0c3dc2c Compare December 29, 2025 10:46
bosd added 2 commits December 29, 2025 13:28
Key changes for Odoo 19 compatibility:
- Update version to 19.0.1.0.0
- Fix pricelist access: use request.env.user.property_product_pricelist
  instead of website.pricelist_id
- Update _shop_lookup_products signature (removed attrib_set parameter)
- Replace SQL-based price aggregation with search_read approach
- Fix TableCompute usage: use main.TableCompute().process() directly
- Remove unnecessary lazy wrappers from products_prices and get_product_prices
- Rename _get_additional_extra_shop_values to _get_additional_shop_values
- Remove visible_on_ecommerce filter from product tags (field removed)
- Update domain validation to work with Odoo 19 ir.model.fields constraint
- Fix test assertions to expect ValidationError instead of ValueError
Add integration tests for website controllers to detect server errors
early. These tests verify that the shop page and product pages can be
accessed without 500 errors, which helps catch issues like missing
attributes (e.g., website.pricelist_id) during development.
Add test requirements file to reference the pending PRs for
attribute_set and product_attribute_set dependencies that are
not yet merged into the 19.0 branch.
@bosd bosd force-pushed the 19.0-mig-website_attribute_set branch from 0c3dc2c to 4966c18 Compare December 29, 2025 12:40
bosd added 3 commits December 30, 2025 23:20
- Fix filter logic to properly apply additional attribute filters
  - Add _get_shop_domain override using Odoo 19 Domain.AND API
  - Fix _search_get_details to handle different attribute types
    (boolean, select, integer, float, char/text)
- Add JavaScript to trigger form submission on filter change
- Add demo data with sample products and attributes for testing
- Add filter tests for boolean and select attribute types
Rename demo attributes to use x_was_demo_* prefix to avoid
conflicts with existing attributes in the database.
Fix TypeError when using search with additional attribute filters.
The issue was passing **post to _get_shop_domain which included
'search' key, conflicting with the positional 'search' argument.

Add test to catch this error early.
@bosd bosd force-pushed the 19.0-mig-website_attribute_set branch 2 times, most recently from 75066fb to b104a88 Compare December 31, 2025 16:17
bosd added 3 commits December 31, 2025 17:56
Add a new boolean field 'e_com_searchable' to control which attributes
are included in e-commerce search, separate from visibility.

This allows large text fields (like descriptions) to be displayed on
product pages without impacting search performance.

- Add e_com_searchable field to attribute.attribute model
- Update search_extra() to filter by e_com_searchable instead of e_com_visibility
- Add field to attribute form view (only visible when e_com_visibility is True)
- Update demo data with searchable flags (description field is NOT searchable)
- Update and add tests for the new behavior
Add ormcache to _get_ecom_visible_attribute_ids to avoid repeated
database queries when displaying multiple products with the same
attribute set on the shop page.

- Cache attribute IDs by model_name, attribute_set_id, and include_native flag
- Clear cache on attribute create/write/unlink when visibility-related fields change
- Significantly reduces database queries on shop pages with many products
Add per-attribute configuration for advanced filter features:

1. Range filters (e_com_range_filter):
   - For integer/float attributes, show min/max inputs instead of dropdown
   - Filters products within the specified range

2. Multi-value selection (e_com_multi_select):
   - For select/multiselect attributes, show checkboxes instead of dropdown
   - Allows selecting multiple values with OR logic

3. Product count badges (e_com_show_count):
   - Shows the number of matching products next to each filter option

Features:
- All options configurable per-attribute in the attribute form view
- Updated filter templates with conditional rendering
- Updated controller with refactored domain building for better maintainability
- Updated JavaScript to handle range input changes
- Demo data includes examples of all features
@bosd bosd marked this pull request as ready for review December 31, 2025 19:02
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.

2 participants