Hello everyone
After reading the posts: https://www.odoo.com/fr_FR/forum/aide-1/question/how-to-remove-sum-of-total-in-group-by-29666 and https://www.odoo.com/fr_FR/forum/aide-1/question/how-to-used-read-group-method-in-new-api-59798,
I have finished with this code:
@api.multi
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
if 'year' in fields:
fields.remove('year')
return super(demo_demo, self).read_group(cr, uid, domain, fields, groupby, offset, limit=limit, context=context, orderby=orderby)
I am trying to remove the "sum" of the field "year" from the tree view when I make a group by.
Problem is, I am getting an "index out of range" error.
My field "year" is declared as:
year = fields.Integer('Year')
How can I do that in Odoo v12?
Thank you in advance
Regards
Paulo