How to calculated many record in report qweb use odoo. I tried to create method in report py to calculate
@api.one
@api.depends("total_do")
def _get_total(self):
batch_ids = self.batch_ids
total_do = self.total_do
for in item batch_ids:
total_do += item.qty_received
print total_do
and i show in qweb like this :
<div class="col-xs-1" style="text-align:center;border: 1px solid #568eff;border-left:0px;">
<span t-esc="o.total_do" />
</div>
When I print report, I want to show total from many row . and in my case just show 0