1
votes

How can I multiply two fields in Odoo Qweb report? I have seen that there is an option to sum several fields/items:

<t t-set="subtotal" t-value="sum(line.price_subtotal for line in layout_category['lines'])"/>

Can I multiply two fields/values?

1

1 Answers

2
votes

To stay in your example:

<t t-set="subtotal"
    t-value="sum([line.field1 * line.field2 for line in layout_category['lines']])"/>