Odoo Help


What conditions must be met so the tree view shows group sums? [Closed]

Julian Solorzano
on 5/7/13, 9:24 PM 5,799 views

The Question has been closed

Ray Carnes
on 05/08/2013 16:43:35

In the tree view of the standard invoice module, one can group by a number of fields, such as the date. Then, a total is shown for each date which is the sum of the totals of all invoices of that date.

image description

Now, I am developing a module in which I added a field to the hr.employee model, a function field of type float. I added this field to the tree view, but when I apply a group filter, the view doesn't show the sum of this new field for each group as in the case of the invoices.

image description

There is also another model I made which shows the sums without problem. In this case it is a normal float field.

image description

So, I thought the problem with the first field might be that is a function field and not a normal float, but then I checked the invoice model and amount_total is also a function field.

So my question is, what must be done so these group sums do show up?

RAY: (Edited to show images - they were inserted incorrectly)


Naresh Soni (nch)

--Naresh Soni (nch)--
--Naresh Soni (nch)--

Team Lead, Odoo(Formerly OpenERP) Support & OPW

Naresh Soni (nch)
On 5/8/13, 2:40 PM

Hello Julien,

By Default in OpenERP the float and integer fields are summed in a group Environment. If its a function field then it must be 'stored' i.e it should have the store = True attribute set.


Hello Naresh, In float field group by how to remove total in header. Please see the link help.openerp.com/question/29666/how-to-remove-sum-of-total-in-group-by/

on 9/11/13, 8:56 AM

Hello Prakash: I had replied on your original question.

Naresh Soni (nch)
on 9/25/13, 6:52 AM

Is there a way to add the store=true parameter to already existing fields somehow? e.g.: hr_timesheet.sheet.total_attendance is probably not set to store=true because there are no intermediate sums if use the group by employee filter? So how would i set this later on ?

Michael Karrer
on 12/17/13, 2:48 PM

Sudhir Arya (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
On 5/8/13, 1:58 AM

You are going on right way. sum attribute is used in Account Invoice tree view. That is why you can see totals in Account Invoice tree view.

These tree fields are used with sum attribute in Invoice tree view:

<field name="residual" sum="Residual Amount"/>
<field name="amount_untaxed" sum="Untaxed Amount"/>
<field name="amount_total" sum="Total Amount"/>

Same way you can also use sum attribute in your desire tree view.


Ray Carnes

--Ray Carnes--
| 9 7 9
Keyport, United States
--Ray Carnes--

Senior ERP Analyst

OpenERP 6.1, 7.0; Odoo 8.0, 9.0, 10.0 and 11.0.

Completed Odoo Functional and Technical Training.

Functional Areas:

  • CRM/Sales

  • Inventory

  • Manufacturing

  • Accounting

  • Purchasing

Major Skills:

  • Business Process Reengineering

  • Efficiency Consulting

  • User Needs and GAP Analysis;

  • Functional and Technical Design;

  • Prototyping and Proof of Concepts;

  • Requirements Specifications;

  • Agile Implementation;

  • Data Migration;

  • Configuration & Customization (UI and code);

  • Integration - Odoo and non Odoo Applications and Services;

  • Training and Knowledge Transfer;

  • Go Live Support;

  • Helpdesk;

  • Version Upgrades and Migration.

  • Accounting Expert.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

I am a skilled Communicator and I only take the serious things seriously!

Ray Carnes
On 5/8/13, 1:57 AM

Check that your field includes the sum tag when added to the treeview.

In tree view Group by Float fields header shows Total time. how to remove total time? [xml sum tag not used but it still shows total time] please see the link http://help.openerp.com/question/29666/how-to-remove-sum-of-total-in-group-by/

on 9/2/13, 5:35 AM
Julian Solorzano
On 5/8/13, 2:09 PM

I found that apparently the condition for the group sums to appear is that if it is a function field, it should be declared with the option store=True.

The sum tag in the view xml is for the bottom bar to appear, i.e. the grand total, not the partial totals.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/7/13, 9:24 PM
Seen: 5799 times
Last updated: 3/16/15, 8:10 AM