Skip to Content
Menu
This question has been flagged
3644 Views

I want to print the variants product as a description of the product in report sale order. For that i have added a new tag th description and i have used span t-esc="', '.join([x.attribute_id for x in o.order_line.product_id.product_tmpl_id.attribute_line_ids])"/ but it shows error QWebException: "sequence item 0: expected string, product.attribute found" while evaluating "', '.join([x.attribute_id for x in doc.order_line.product_id.product_tmpl_id.attribute_line_ids])" .Any help please ?

 <t t-foreach="doc.order_line" t-as="l">
                    <tr t-if="l.product_uom_qty">
                        <td>
                            <span t-field="l.product_id.name"/>
                        </td>
                        <td>
                            <span><t t-esc="', '.join([x.attribute for x in doc.order_line.product_id.product_tmpl_id.seller_ids])"/> </span>
                        </td>
                        <td>
                            <span t-field="l.product_id.default_code"/>
                        </td>

                        <td>
                            <span><t t-esc="', '.join([x.product_code for x in doc.order_line.product_id.product_tmpl_id.attribute_line_ids])"/> </span>
                        </td>

                        <td class="text-right">
                            <span t-field="l.product_uom_qty"/>
                            <span groups="product.group_uom" t-field="l.product_uom"/>
                        </td>
                        <td class="text-right">
                            <span t-field="l.price_unit"/>
                        </td>

                        <td class="text-right">
                            <span t-esc="', '.join(map(lambda x: (x.description or x.name), l.tax_id))"/>
                        </td>
                    </tr>
                </t>
            </tbody>


Avatar
Discard
Related Posts Replies Views Activity
1
Nov 21
4697
0
Oct 19
2176
1
Nov 18
1959
0
Jul 18
3028
3
Jan 18
5574