Skip to main content

Jinja Reports module

jinja_reports is a jinja2 extension developed to work with Tryton ERP. We can create our own reports based on jinja2 with html templates.

How does it work?

Steps to use Jinja Reports:

  1. Inherit the base Jinja2Report class.
  2. Define the meta model name.
  3. Create an html template.
  4. Create an action report pointing to template path and model name.

Example

Here's a an example of a report which contains three files.

  1. Python class that must be registered to the Tryton Pool.
from trytond.modules.jinja_report.report import Jinja2Report
from trytond.pool import Pool

class MyReport(Jinja2Report):
    __name__ = 'my_module.my_report'

def register():
    Pool.register(MyReport, module='your_module', type_='report')
  1. The html template of your report
<html>
    <body>
        {% for record in records %}
            {{ record.name }}
        {% endfor %}
        {{ data.get('some_data') }}
    </body>
</html>
  1. The action report registered as xml:
        <record model="ir.action.report" id="my_report_action">
            <field name="name">Title of my report</field>
            <field name="report">path/to/my/report.html</field>
            <field name="report_name">my_module.my_report</field>
            <field name="model">party.party</field>
            <field name="extension">pdf</field>
            <field name="template_extension">html</field>
        </record>

Metadata

Release files for trytoncalidae-jinja-report 7.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trytoncalidae-jinja-report 7.4.0
File Size Uploaded Provenance Actions
trytoncalidae_jinja_report-7.4.0.tar.gz 18.6 kB Without provenance Details for trytoncalidae_jinja_report-7.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for trytoncalidae-jinja-report 7.4.0
File Interpreter ABI Platform Actions
trytoncalidae_jinja_report-7.4.0-py3-none-any.whl Python 3 none any Details for trytoncalidae_jinja_report-7.4.0-py3-none-any.whl

Total release size: 36.8 kB

Release files / trytoncalidae_jinja_report-7.4.0.tar.gz

Download URL trytoncalidae_jinja_report-7.4.0.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1d5375c8663f66415bdbc538dc3025038cf9bab56dd49fe5a78a163f715f318e
BLAKE2b-256 checksum
How to use checksums
523efeac1c759c6e1a6870405ea967eb028885509c0d45871a6f0e0c3669abea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / trytoncalidae_jinja_report-7.4.0-py3-none-any.whl

Download URL trytoncalidae_jinja_report-7.4.0-py3-none-any.whl
Size 18.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e72894edb7f35b0d4fec7308bcbac185b7454d124e97622cd9e9de0873d443f8
BLAKE2b-256 checksum
How to use checksums
cd11f2e3b8a5628764cd8629597e1e63302399dde325691935003079a42ee4b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Security for trytoncalidae-jinja-report 7.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page