Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Very Useful Tags in OpenOffice Reports

    • 0
    • 1
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 488
    Comment on it

    Here are some important very useful tags that can help you definitely while creating various kinds of reports:

    1. [[ repeatIn(objects,'o') ]]: To add loop on the object selected, example [[ repeatIn(objects,'invoice') ]].

    2. [[ repeatIn(o.invoice_line,'l') ]]: To add loop on each line of the object or an invoice, example [[ repeatIn(o,order_line,'l') ]], adds a loop on lines of a sale order.

    3. [[ (o.prop=='value')and 'YES' or 'NO' ]]: Prints Yes or No according to the condition, example [[ (invoice.state=='cancel')and 'Canceled' or '' ]], adds Canceled where an invoice is canceled.

    4. [[ round(o.length * o.breadth * 2, 2) ]]: Prints a calculated value on fields rounded to two decimal precision, example [[ round(line.price * line.quantity, 2) ]], prints subtotal for a line in an order or an invoice.

    5. [[ reduce(lambda x, obj: x+obj.qty , list , 0 ) ]]: Prints sum of the quantity in a list, example [[ reduce(lambda x, obj: x+obj.amount_total , objects , 0 ) ]], sum of the total amounts from a list of invoices.

    6. [[ setLang(o.partner_id.lang) ]]: For localized printing, setting the language for the report like English, French etc.

    7. [[ formatLang(o.date_invoice,date=True) ]]: For printing date in a format that is used in the defined setLang, for example in India, we use a date in dd/mm/yy format.

    8. [[ time.strftime('%d/%m/%Y') ]]: Prints the date in dd/mm/yy format from a time string.

    9. [[ time.ctime() ]]: Prints the current date and time.

    10. [[ user.name ]]: Prints the user of the OpenERP database.

 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: