Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Summing a column in an OpenERP report

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 153
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: