i want change sum of field obj_global but i can't do that
I overwrite of function read_group but i don't have a correct Sum i want have Total sum= sum of group by section_id :130000=10000+70000+50000 think's for our help
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False, lazy=True):
res = super(obj_report_line, self).read_group(cr, uid, domain, fields, groupby, offset, limit=limit, context=context, orderby=orderby, lazy=lazy)
if 'obj_report_line' in fields :
for line in res:
if '__domain' in line:
lines = self.search(cr, uid, line['__domain'], context=context)
pending_value = 0.0
for current_account in self.browse(cr, uid, lines, context=context):
if 'section_id' in groupby and 'date' not in groupby:
pending_value = current_account.obj_global
else:
pending_value = 0.0
if
fields.remove('column')
line['obj_global'] = pending_value
return res