Files
Odoo-18.0-20251222/report_py3o/readme/USAGE.md
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

40 lines
1.3 KiB
Markdown

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.
\## Available functions and objects
user Browse record of current user
lang The user's company's language as string (ISO code)
b64decode base64.b64decode
format_multiline_value(string) Generate the ODF equivalent of \<br/\>
and &nbsp; for multiline fields (ODF is XML internally, so those would
be skipped otherwise)
html_sanitize(string) Sanitize HTML string
time Python's time module
display_address(partner) Return a formatted string of the partner's
address
o_format_lang(value, lang_code=False, digits=None, grouping=True,
monetary=False, dp=False, currency_obj=False, no_break_space=True)
Return a formatted numeric or monetary value according to the context
language and timezone
o_format_date(value, lang_code=False, date_format=False) Return a
formatted date or time value according to the context language and
timezone
\## Sample report templates
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>).