如何解决如何在QWEB报表中汇总行Odoo 13?
这是从库存拣选模型中得出的。
我能够添加一条跨度线
<span t-esc="move_operation.mapped('picking_id').display_name"/>
这给了我产品的名称,但是我需要能够添加行。
我尝试过
<t t-esc="sum(l.price_total for l in move_operation.mapped('picking_id') " />
但是还没有成功。
解决方法
一种实现方式类似于在发票中完成: https://github.com/odoo/odoo/blob/d3a6afe51fc4b864368acbc40a86ac6974d328dd/addons/account/views/report_invoice.xml#L72
您初始化变量。
<t t-foreach="lines" t-as="line">
<t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal"/>
在每一行中,将值添加到变量中。
<span t-esc="current_subtotal"/>
然后打印它。
$filter
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。