1
votes

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...enter image description here

<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>

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>
3
did you tried removing individual 'sum' from the fields?Hardik Patadia
yes i did, and its workingTayyab Javed

3 Answers

3
votes

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"/>

1
votes

Just get rid of the sum attribute(s)

<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>
0
votes

It's done, I just removed sum="" from every field and it removes the bottom line with the 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>