Custom report filenames

report_custom_filename
REPOSITORY
REPOSITORYOCA/reporting-engine
GIT
GIThttps://github.com/OCA/reporting-engine.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/reporting-engine/tree/9.0/report_custom_filename
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYReporting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSPedro M. Baeza, Jairo Llopis, Stéphane Bidoul (ACSONE), OCA Transbot, Juan Jose Scarafia, Stefan Rijnhart (Opener), oca-travis
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:24
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
    - mail
    - base_setup
    - web_kanban
    - bus
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES jinja2
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
act_report_xml_view ir.actions.report.xml field Inherits base.act_report_xml_view
Models touched (1)

New fields (1)
  • download_filename Char
    help="Fill in this field to have a custom file name when downloading this report. This string is evaluated as a jinja2 expression.\nYou can use python expressions, `objects` is a browse record list of the objects for which the report is being generated.\nCheck for this list's length to determine if it is a report being printed for multiple records or not. You also have access to `o`, which is the first record in the list.\nFor qweb reports, the variable `ext` gives you the requested format's extension" args: 'Download filename'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/reporting-engine
GIT
GIThttps://github.com/OCA/reporting-engine.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/reporting-engine/tree/8.0/report_custom_filename
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYReporting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSStéphane Bidoul, Alexis de Lattre, Yannick Vaucher, Alexandre Fayolle, Stefan Rijnhart, Holger Brunn, GitHub, Stéphane Bidoul (ACSONE), OCA Transbot, oca-travis
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:27
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - base
    - email_template
    - mail
    - base_setup
    - web_kanban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES jinja2
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
act_report_xml_view ir.actions.report.xml field Inherits base.act_report_xml_view
Models touched (1)

New fields (1)
  • download_filename Char
    help="Fill in this field to have a custom file name when downloading this report. This string is evaluated as a jinja2 expression.\nYou can use python expressions, `objects` is a browse record list of the objects for which the report is being generated.\nCheck for this list's length to determine if it is a report being printed for multiple records or not. You also have access to `o`, which is the first record in the list.\nFor qweb reports, the variable `ext` gives you the requested format's extension" args: 'Download filename'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/reporting-engine
GIT
GIThttps://github.com/OCA/reporting-engine.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/reporting-engine/tree/7.0/report_custom_filename
VERSION
VERSION 1.0
CATEGORY
CATEGORYReporting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Therp BV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Therp BV
COMMITTERS
COMMITTERSLaetitia Gangloff, Stefan Rijnhart, Daniel Reis, Stéphane Bidoul (ACSONE), OCA Transbot, Sébastien BEAU
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:16
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - web
    - email_template
    - mail
    - base
    - base_setup
    - web_kanban
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES jinja2
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Custom report filenames
=======================

This addon allows for custom filenames for reports.

Configuration
=============

To configure this module, open the report whose filename you want to change
and fill in the `Download filename` field. This field is evaluated as jinja2
template with `objects` being a list of browse records of the records to
print, and `o` the first record.

Known issues / Roadmap
======================

 * Currently, only old-style reports (ir.actions.report.xml) are supported,
   it should be simple to add support for qweb reports.

Credits
=======

Contributors
------------

* Holger Brunn <hbrunn@therp.nl>
* Sébastien Beau <sebastien.beau@akretion.com>

Icon
----

Icon courtesy of http://www.picol.org/ (download_settings.svg)

Maintainer
----------

.. image:: http://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: http://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.
    

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
act_report_xml_view ir.actions.report.xml field Inherits base.act_report_xml_view
Models touched (1)

New fields (0)

No new fields.

Public methods (1)
  • generate_filename(self, cr, uid, report_name, context=None)