Its is very obvious that you would need reports in accounting where you are supposed to analyse the sales, refunds, and many more accounting documents, this means you would require maths functions too while creating OpenOffice reports for OpenERP.
I got this requirement a few months back. Here it is,too simple:
At the last row or cell of your report.sxw, just write the following syntax:
[[ reduce(lambda x, obj: x+obj.field_name , objects , 0 ) ]]
For example you want to sum the total amount out of the list of invoices,
[[ reduce(lambda x, obj: x+obj.amount_total , objects , 0 ) ]]
Convert to fields and save. Send to the server. That's it.
0 Comment(s)