Hi,
I'm trying to edit report_saleorder_document to display each variant on a product's template separately.
I'm using the code:
<t t-foreach="doc.order_line" t-as="line">and the result is:
<span t-field="line.name"/>
<span t-field="line.product_template_attribute_value_ids"/>
</t>
T-Shirt Blue,Size XL,Cotton |
but how can I retrieve ONLY the second variant (Size) to get a result like this?
T-Shirt Size XL |
NOTE ****************************************************************************************************
I have already tried to split the text, but it's not working
<t t-set="splited" t-value="line.product_template_attribute_value_ids.split(',')"/>
<t t-esc="splited[2]"/>
I get the error
AttributeError: 'product.template.attribute.value' object has no attribute 'split'