Skip to content

[19.0] [FIX] website_sale_comparison_specification_variant: excluded single values - #1348

Open
ivantodorovich wants to merge 2 commits into
OCA:19.0from
camptocamp:19.0-fix-website_sale_comparison_specification_variant-single-value
Open

ivantodorovich wants to merge 2 commits into
OCA:19.0from
camptocamp:19.0-fix-website_sale_comparison_specification_variant-single-value

Conversation

@ivantodorovich

@ivantodorovich ivantodorovich commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The specs table lists single-value lines in a separate loop, which was not filtered by the selected combination: an informational value excluded for a variant was still shown for it.

When an attribute has a single value, the specifications table showed it for every variant, even for the variants it is excluded for.

Steps to reproduce:

  1. Create a product with a Size attribute (Size 1, Size 2) that creates variants.
  2. Add a Material attribute that never creates variants, with the single value Wood.
  3. On Wood, set "Exclude for" to Size 2.
  4. Open the product page and select Size 2.

The specifications still show "Material: Wood"; Material should not be listed for Size 2.

@OCA-git-bot OCA-git-bot added series:19.0 mod:website_sale_comparison_specification_variant Module website_sale_comparison_specification_variant labels Oct 7, 2026
@ivantodorovich
ivantodorovich force-pushed the 19.0-fix-website_sale_comparison_specification_variant-single-value branch from e5a6ed0 to 2aa1f10 Compare October 7, 2026 18:23
@ivantodorovich
ivantodorovich marked this pull request as ready for review October 7, 2026 18:33
@ivantodorovich
ivantodorovich force-pushed the 19.0-fix-website_sale_comparison_specification_variant-single-value branch from 2aa1f10 to 46225c3 Compare October 7, 2026 19:36
…fications

The specifications listed attributes with no value for the selected
variant: a single value excluded for it was still shown, and an
attribute whose values are all excluded for it was shown as an empty
row. A category left without attributes was listed too.

Steps to reproduce:
1. Create a product with a Size attribute (Size 1, Size 2) that creates
   variants.
2. Add two attributes that never create variants, both in a Composition
   category: Material, with the single value Wood, and Color, with Red
   and Blue.
3. On Wood, Red and Blue, set "Exclude for" to Size 2.
4. Open the product page and select Size 2.

The specifications show "Material: Wood", an empty Color row and the
Composition category; none of them should be listed for Size 2.
@ivantodorovich
ivantodorovich force-pushed the 19.0-fix-website_sale_comparison_specification_variant-single-value branch from 46225c3 to 37c6898 Compare October 7, 2026 19:42
…t accordion category

With the specifications shown as an accordion, changing variant left the
first category as it was: QWeb leaves out an attribute valued 0, so the
first category was sent back without its position, and the page could
not find which category to refresh.

Steps to reproduce:
1. Show the specifications as an accordion on the product page.
2. Create a product with a Size attribute (Size 1, Size 2) that creates
   variants, and a Material attribute, in another category.
3. Open the product page and select Size 2.

The first category still shows Size 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:website_sale_comparison_specification_variant Module website_sale_comparison_specification_variant series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants