[FIX] website_sale: product attribute line

In e-commerce, on a product page. If the product has some attributes
("product.attribute.line" model), the display of these attributes must
respect the sequence defined in:
Sales > configuration > products > attributes("product.attribute" model)

opw:648634
This commit is contained in:
Goffin Simon
2015-09-08 09:11:11 +02:00
parent a7b2208de5
commit 19a523ff64
+1 -1
View File
@@ -507,7 +507,7 @@
<xpath expr="//p[@t-field='product.description_sale']" position="after">
<hr t-if="sum([(1 if len(l.value_ids)==1 else 0) for l in product.attribute_line_ids])"/>
<p class="text-muted">
<t t-foreach="product.attribute_line_ids" t-as="variant_id">
<t t-foreach="product.attribute_line_ids.sorted(key=lambda x: x.attribute_id.sequence)" t-as="variant_id">
<t t-if="len(variant_id.value_ids)==1">
<span t-field="variant_id.attribute_id"/>: <span t-field="variant_id.value_ids[0].name"/><br/>
</t>