Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4605 Vizualizări

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>


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
nov. 21
6134
0
oct. 19
3304
1
nov. 18
3114
0
iul. 18
3975
3
ian. 18
6234