India

ZestyBeanz Technologies Pvt Ltd 4th Floor, Nila, Technopark Thiruvananthapuram,
India – 695581
Phone: +91 471 4063254
Fax : +91 471 2700171

   .

ZestyBeanz Technologies Pvt Ltd
61/3236, Manikkath Cross Road
Ravipuram, Kochi, India - 682016
Phone: +91 484 4063254

  UAE

Zesty Labs
Office # 2003, Millennium Plaza Building
Sheikh Zayed Rd, Dubai, UAE
Phone: +971 4333 2222​
Mobile: +971-52-7553466

  Germany​

ZestyBeanz Technologies GmbH
Reuterstraße 1
90408 Nürnberg
Fon: +49 911 4801 444
Fax: +49 911 4801 445

Group Operator in OpenERP for Grouping

Contact Form


omalbastin's picture

Group Operator in OpenERP for Grouping

When defining search views, we may sometimes need to add "group_by" filters for showing the list view in groups. For example,

The image shown above is from sale order. Here the list view grouping is done by user_id(salesman). Let focus on Demo User. Here four sale orders are created by the Demo user.

This is the extended view. Here the name written in bold is the group name. Now focus on the Untaxed Amount and Total and the value writen inside the red marker. The value shown inside the red marker are actually the sum of float or integer fields comes under the group. Here comes the use of group operator. The default value for group_operator is sum. Thats why we are getting the sum when grouping. To change the default value goto our python file, in the field definition add group_operator="avg" to get the average, group_operator="min" to get the minimum value from the group, group_operator="max" to get the maximum value from the group.

For example,

Here I added group_operator="avg" in the untaxed amount. Now we have to verify it by grouping.

Here the value shown inside the red marker is the average of that group. Now you can try the min and max.

Anonymous's picture

Thank you!

Thank you!

Anonymous's picture

This is a very fine article,

This is a very fine article, I think there will be countless people like it, of course, I was one of the them. I feel this article increase my awareness.