OCA reporting engine fork for dev and update.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.4 KiB

  1. The templating language is `extensively documented <http://py3otemplate.readthedocs.io/en/latest/templating.html>`_, the records are exposed in libreoffice as ``objects``, on which you can also call functions.
  2. Available functions and objects
  3. -------------------------------
  4. user
  5. Browse record of current user
  6. lang
  7. The user's company's language as string (ISO code)
  8. b64decode
  9. ``base64.b64decode``
  10. format_multiline_value(string)
  11. Generate the ODF equivalent of ``<br/>`` and ``&nbsp;`` for multiline fields (ODF is XML internally, so those would be skipped otherwise)
  12. html_sanitize(string)
  13. Sanitize HTML string
  14. time
  15. Python's ``time`` module
  16. display_address(partner)
  17. Return a formatted string of the partner's address
  18. o_format_lang(value, lang_code=False, digits=None, grouping=True, monetary=False, dp=False, currency_obj=False, no_break_space=True)
  19. Return a formatted numeric or monetary value according to the context language and timezone
  20. o_format_date(value, lang_code=False, date_format=False)
  21. Return a formatted date or time value according to the context language and timezone
  22. Sample report templates
  23. -----------------------
  24. Sample py3o report templates for the main Odoo native reports (invoice, sale order, purchase order, picking, etc.) are available on the Github project `odoo-py3o-report-templates <https://github.com/akretion/odoo-py3o-report-templates>`_.