Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 865 |
Technical Name |
cml_dynamic_report |
License | LGPL-3 |
Website | https://kaypi.pe |
Versions | 16.0 17.0 |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 865 |
Technical Name |
cml_dynamic_report |
License | LGPL-3 |
Website | https://kaypi.pe |
Versions | 16.0 17.0 |
Dynamic Report
This module allows you to generate dynamic XLSX and TXT reports for any model: inventory transfers, sales, purchases, invoices, etc.
Configure Access Rights
Select the user group that can generate dynamic reports.

Create Report
Build a report by selecting exactly the fields you need.

Example: Report PLE 14.1
- Report Name: Defines the title of the report, for example
PLE 14.1
for the Sales Register. - Model: Origin of the data, in this case
account.move
(Journal Entry). - Filename: Uses dynamic tags to automatically generate filenames:
{VAT}
: Replaced with the company’s VAT number (RUC).{DAY}
: The day of the report’s generation, in two-digit format (e.g.,31
).{MONTH}
: The month of the report’s generation, in two-digit format (e.g.,03
for March).{YEAR}
: The year of the report’s generation, in four-digit format (e.g.,2025
).{START}
: The start date of the report's data range (format:YYYYMMDD
).{END}
: The end date of the report's data range (format:YYYYMMDD
).
- Generate XLSX: Enables Excel export.
- Generate TXT: Generates the .txt file.
- Columns: Each field represents a column in the report.
Create Columns
Date Field
Date fields are used to export and manipulate date-type values such as invoice
issuance, due dates, or transaction periods. In
addition to simple formatting (%d/%m/%Y
), Python can be used to:
- Validate ranges (e.g. current month, fiscal period).
- Compare or calculate differences between dates.
- Conditionally display values only if the date exists.
- Cell centered alignment in xlsx
Example: Export invoice due date with format dd/mm/yyyy
.
if record.invoice_date_due: result = record.invoice_date_due.strftime('%d/%m/%Y') else: result = ""


Numeric Field
Numeric fields are essential for displaying values such as totals, taxes, quantities, and discounts. You can:
- Apply precise decimal formatting.
- Fallback to default values (e.g.
0.00
). - Enable the column sum option to show total below the report.
- Format values with currency symbols or fixed width.
- Cell right aligned in xlsx
Example: Export total amount with 2 decimal places.
result = f"{record.amount_total or 0.00:.2f}"
Text Field
Text fields are useful for exporting series, document codes, references or any string-type value. With Python logic, you can:
- Split or clean data (e.g. separate prefix from number).
- Transform values (e.g. uppercase, lowercase, replace).
- Show default text if field is empty.
- Combine multiple fields into one output.
- Cell left aligned in xlsx
Example: Extract document prefix from name.
result = record.name.split('-')[0] if record.name and '-' in record.name else ""

Configuration & Tabs
Configuration Tab
The Configuration tab lets you define how records are filtered and which date fields are used when generating the dynamic report.
- Date Field Required: Enables filtering by a date field. If checked, you must define a path below.
- Date Field Path: Indicates the technical date field (e.g.
invoice_date
) used for filtering within periods (e.g. PLE monthly) or date ranges. - Domain: Specifies which records should be included. This can filter by type, state, and other fields using Odoo domain logic.
- View Domain in Wizard: If enabled, lets users customize filters from the report download wizard.
Example: In this case, the domain filters invoices, credit notes, and receipts that are either Posted or Cancelled.


XLSX Tab
The XLSX tab is enabled when Generate XLSX is checked.
- Generate Index: Enables the generation of an index in the first row and column.
TXT Tab
The TXT tab is enabled when Generate TXT is checked.
- Separator: Separator character used to separate values in the output file.
- Generate ZIP: Enables the generation of a zip file containing the .txt files.


Create Menu
- Menu Name: Defines the title of the menu, for example
PLE 14.1
- Menu Parent: Select the parent menu.
- Menu Sequence: Sequence of the menu.
- Groups: Group of users that can access the menu.
Download Report Wizard
Download Report Wizard
Download report from menu Dynamic Report/Download dynamic report
or from the menu
generated with Create Menu
.
- Report: Select the report to download.
- File Name Structure: View or modify the structure of the file name.
- File Name: See the file name that will be generated.
- Filter Type: visible if
Date Field Required
is checked in report. allows filtering the report by month or date range - Month and Year: Visible if
Filter Type
is by month - Date Start and End: Visible if
Filter Type
is by date range - Domain: Visible if
View Domain in Wizard
is checked. Allows see and modify all filters applied to the report.


Generate Report Wizard
When generating the reports allows us to download the report types that we have configured.
- Download report types that we have configured.
Result: Report XLSX
PLE 14.1 Sales Register
with data and formats
defined in the report.

Result: Report XLSX

Result: Report TXT
PLE 14.1 Sales Register
with data and
formats defined in the report.

Need Any Help?
We’re here to assist you with setup, customization, or any questions.
Please log in to comment on this module