hi, this is an SQL that generates the report by Sales Order in detail. I have made some changes to the query according to my need but now I want a summarized row that displays the sum of quantity, sub-total and total amount of all rows at the bottom.
Please help on how to achieve this.
elif data.get('report_type') == 'report_by_order_detail':
query = '''
SELECT ru.id,
so_line.product_id, res_users.partner_id, so.payment_status
'''
self._cr.execute(query)
report_by_order_details = self._cr.dictfetchall()
report_sub_lines.append(report_by_order_details)