Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
In OpenERP 7 List view time data added using the below code:-
'in_time' : fields.float('In Time'),
<field name="intake_time" widget="float_time"/>
In List view selected "Group by " any fields Header shows Total In time Value
How to remove Total In time value ? [in xml file not added sum keyword but group by still shows sum time ]
Probably a bit late!
You could override the read_group method like this on you model:
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
if 'intake_time' in fields:
return super(MyClassName, self).read_group(cr, uid, domain, fields, groupby, offset, limit=limit, context=context, orderby=orderby)
The default Float field value for group_operator shows sum of value
Currently "Group by" Field values able to change to min, max, avg
But unable to remove group by value
i applied group_operator = None or group_operator = False but its still shows sum of total. How to group_by remove sum or set to value None
By default OpenERP Will consider 'SUM' as group operator . So you wan't be able to remove this behavior easily by any sort of configuration or xml code. For this you need to make changes in the orm.py in
def read_group method and comment out the code that adds the default 'SUM' to integer and float fields at line 2664.
Hope this helps !
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/30/13, 7:40 AM|
|Seen: 7278 times|
|Last updated: 5/6/16, 10:50 AM|