如何在odoo的树视图中删除/隐藏总和? [英] How to remove/hide total sum in tree view in odoo?
问题描述
我有 odoo 树视图,其中有一些仓库库存值显示在列中.并在底部计算这些仓库值的总和.我想删除树视图底部的总和,我该怎么做?您可以看到我应用 sum="false", total="false" 的树视图代码,但它不起作用.有人知道如何在odoo中删除树视图中的总和吗?我还附上了图片,以便您可以轻松理解我的问题.提前致谢...
I have odoo tree view in which there are some warehouse stock values displaying in columns. And its calculating total sum of these warehouse values in the bottom. I want to remove total sum in the bottom in tree view, how i can do that? you can see my tree view code i applied sum="false", total="false" but its not working. Anybody have idea that how it can be possible to remove total sum in tree view in odoo? I am also attaching image so you can easily understand my question. Thanks in advance...
<tree string="Warehouse Product" editable="bottom" create="false" edit="false" delete="false" sum="false">
<field name="warehouse_id"/>
<field name="qty" sum="Quantity"/>
<field name="incoming_qty" sum="Incoming"/>
<field name="outgoing_qty" sum="Total Confirmed"/>
<field name="reserved_event" sum="Events"/>
<field name="reserved_sale" sum="Total Reserved"/>
<field name="backorder_qty" sum="Backordes"/>
<field name="actual_qty" sum="Actual Qty"/>
<field name="warehouse_inventory" sum="Total Warehouse Qty"/>
</tree>
它完成了,我只是从每个字段中删除 sum="" 并删除总和的底线,这是我更新的代码
Its done, i just remove sum="" from every field and it remove bottom line of total sum, here is my updated code
<tree string="Warehouse Product" editable="bottom" create="false" edit="false" delete="false">
<field name="warehouse_id"/>
<field name="qty"/>
<field name="incoming_qty"/>
<field name="outgoing_qty"/>
<field name="reserved_event"/>
<field name="reserved_sale"/>
<field name="backorder_qty"/>
<field name="actual_qty"/>
<field name="warehouse_inventory"/>
</tree>
推荐答案
如果您只想转到设置/用户技术 -> 界面 -> 视图,您可以像这样编辑视图.只需从您不想合计的行中完全删除 sum 标记即可.
If you just want to go to Settings/User Technical -> Interface -> Views you can edit the view like this. Just remove the sum tag entirely from the rows you wish not to be totalled.
<tree string="Warehouse Product" editable="bottom" create="false" edit="false" delete="false">
<field name="warehouse_id"/>
<field name="qty" sum="Quantity"/>
<field name="incoming_qty"/>
<field name="outgoing_qty"/>
<field name="reserved_event"/>
<field name="reserved_sale"/>
<field name="backorder_qty"/>
<field name="actual_qty"/>
<field name="warehouse_inventory"/>
这篇关于如何在odoo的树视图中删除/隐藏总和?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!