summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/jquery.mjs.nestedSortable
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2016-09-14 12:44:54 +0200
committerDenis Ledoux <dle@odoo.com>2016-09-14 12:59:15 +0200
commit01c68bc2a4bed263dd5ff298825e1dc25bcc2fe3 (patch)
tree2ad6d95206ce8fb822fc88c4516453600545d17d /addons/web/static/lib/jquery.mjs.nestedSortable
parent19b4f5efe4ee69f0fcd73ebe80f6347b30681354 (diff)
[FIX] website_sale: fix variants availability on website product page
This is an oversight during the conversion to the new API in the revision 788c1334e2cbe26fa26d4c6d4974dc413dbff608 In the above revision, ``` visible_attrs = set(l.attribute_id.id for l in product.attribute_line_ids if len(l.value_ids) > 1) ``` has been converted to ``` visible_attrs_ids = product.mapped('attribute_line_ids.attribute_id').filtered(lambda attr: len(attr.value_ids) > 1).ids ``` which leads to a change of behavior: Before the conversion, the filter is applied on the attribute line `value_ids` field: `if len(l.value_ids) > 1`, `l` being one item of `attribute_line_ids` After the converison, the filter is applied on the attribute line `attribute_id.value_ids` field `filtered(lambda attr: len(attr.value_ids) > 1)`, `attr` being the `attribute_id` field of one item of `attribute_line_ids` Therefore breaking the availability of the product variants in the products pages of the ecommerce. e.g. Attribute color, values red, blue, white, black The product "Tshirt" is defined with as possible colors values red only. Before, the filter would not return the attribute `color` for this product, as the product has only one possible value for this attribute After, the filter would return the attribute `color`, since this attribute as more than one possible values (but, not for this product) opw-688470
Diffstat (limited to 'addons/web/static/lib/jquery.mjs.nestedSortable')
0 files changed, 0 insertions, 0 deletions