I need sum row in tree view, and add where condition if is it possible!
My tree view:
row | field_1 | field_2
1 | 8 | Messi
2 | 8 | Messi
3 | 8 | Ronaldo
4 | 8 | Ronaldo
How sum only for Messi and only for Ronaldo and get result 16
In below span I get 32
<span t-esc="sum(line.field_1 for line in doc.my_ids)" widget="float_time"/>
Any solution?
<span t-esc="Messi"/> 16
<span t-esc="Ronaldo"/> 16
field_2
. So Odoo calculate the sum value of the field_1 for you automatic – qvpham