Reputation: 5495
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?
Upvotes: 1
Views: 1437
Reputation: 14768
To stay in your example:
<t t-set="subtotal"
t-value="sum([line.field1 * line.field2 for line in layout_category['lines']])"/>
Upvotes: 2