Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8cea699
[ADD] report_pdf_form
grindtildeath May 14, 2025
aa0ba99
[UPD] Update report_pdf_form.pot
Dec 16, 2025
ed65bb4
[BOT] post-merge updates
OCA-git-bot Dec 16, 2025
f0a518e
Added translation using Weblate (Italian)
mymage Dec 17, 2025
b341ce1
Added translation using Weblate (Dutch)
bosd Dec 18, 2025
2800505
[MIG] report_pdf_form: Migration to 19.0
Dec 18, 2025
a98a6b9
[IMP] report_pdf_form: prevent crash from non exsisting path
bosd Dec 18, 2025
e2236e3
[IMP] report_pdf_form: Fix field formatting
Dec 18, 2025
b71888e
[IMP] report_pdf_form: Add unique constraint on report_id
Dec 18, 2025
1997ecb
[IMP] report_pdf_form: Add code widget to field value and variable co…
Dec 18, 2025
00b0174
[IMP] report_pdf_form: Add demo data and documentation updates
Dec 18, 2025
9169600
[IMP] report_pdf_form: improve documentation
bosd Dec 29, 2025
8aa56f1
[IMP] report_pdf_form: add field validation and PDF preview functiona…
bosd Dec 29, 2025
26879bd
[IMP] report_pdf_form: fix translation formatting issues
bosd Dec 29, 2025
18d0995
fix(report_pdf_form): move binding to PDF form record
bosd Dec 30, 2025
7a7b572
fix(report_pdf_form): fix view and test issues
bosd Dec 30, 2025
232cb24
feat(report_pdf_form): auto-populate model_id from report_id
bosd Dec 30, 2025
a960aa6
fix(report_pdf_form): fix translation formatting for linter
bosd Dec 30, 2025
400cc82
fix(report_pdf_form): use direct _() for translations
bosd Dec 30, 2025
b81b37e
fix(report_pdf_form): use self.env._ for translations as required
bosd Dec 30, 2025
44af299
fix(report_pdf_form): use .format() method for translations
bosd Dec 30, 2025
1ed8c9a
fix(report_pdf_form): fix translations in ir_actions_report.py
bosd Dec 30, 2025
e2d40fb
fix(report_pdf_form): make validation more lenient during creation
bosd Dec 30, 2025
115ef0c
fix(report_pdf_form): revert to self.env._ for simple translations
bosd Dec 30, 2025
22e6286
fix(report_pdf_form): use % formatting for parameterized translations
bosd Dec 30, 2025
3efb72a
fix(report_pdf_form): use _() for all translations
bosd Dec 30, 2025
178eac6
fix(report_pdf_form): use proper translation approach
bosd Dec 30, 2025
2436acc
fix(report_pdf_form): use self.env._ for all translations
bosd Dec 30, 2025
6274f9d
fix(report_pdf_form): skip validation when model not available
bosd Dec 30, 2025
7897c69
fixup
bosd Dec 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions report_pdf_form/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===============
Report PDF Form
===============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:50d8a5bc56259a22c4c2ac64ba9b38c9d5755859dee53f93a0dbd06b84b7a15a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
:target: https://github.com/OCA/reporting-engine/tree/19.0/report_pdf_form
:alt: OCA/reporting-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/reporting-engine-19-0/reporting-engine-19-0-report_pdf_form
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to use PDF files having form fields as Odoo reports
to be printed with values being filled from Odoo records.

This module mostly reuses features that were implemented by Odoo in the
sale_pdf_quotation_builder module.

Creating PDF Form Fields
------------------------

To create PDFs with form fields for use with this module, you can use
various tools:

- **docfly.com**: An online tool for adding form fields to PDFs
- **LibreOffice Draw**: Part of the LibreOffice suite, can add form
fields to PDFs
- **Scribus**: A desktop publishing application that can create PDFs
with form fields

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_
Comment on lines +53 to +56
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still Alpha ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so.. This is the first migration. And have been adding some features.
Ci is 🔴 😿

Maybe later promote it to beta? Will check the requirements..


**Table of contents**

.. contents::
:local:

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

Add a dedicated report type to avoid having to define a qweb template
and have everything on ir.actions.report.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_pdf_form%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Camptocamp

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

- Akim Juillerat akim.juillerat@camptocamp.com

Maintainers
-----------

This module is maintained by the OCA.

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

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.

.. |maintainer-grindtildeath| image:: https://github.com/grindtildeath.png?size=40px
:target: https://github.com/grindtildeath
:alt: grindtildeath

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-grindtildeath|

This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/19.0/report_pdf_form>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions report_pdf_form/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
26 changes: 26 additions & 0 deletions report_pdf_form/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2025 Camptocamp SA
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl)
{
"name": "Report PDF Form",
"summary": "Fill custom PDF form reports ",
"version": "19.0.1.0.0",
"development_status": "Alpha",
"category": "Reporting",
"website": "https://github.com/OCA/reporting-engine",
"author": "Camptocamp, Odoo Community Association (OCA)",
"maintainers": ["grindtildeath"],
"license": "LGPL-3",
"application": False,
"installable": True,
"preloadable": True,
"depends": [
"web",
],
"data": [
"security/ir.model.access.csv",
"views/report_pdf_form.xml",
],
"demo": [
"demo/report_pdf_form_demo.xml",
],
}
Binary file added report_pdf_form/demo/form_example.pdf
Binary file not shown.
84 changes: 84 additions & 0 deletions report_pdf_form/demo/report_pdf_form_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Demo PDF attachment -->
<record id="demo_pdf_attachment" model="ir.attachment">
<field name="name">demo_form.pdf</field>
<field name="type">binary</field>
<field
name="datas"
type="base64"
file="report_pdf_form/demo/form_example.pdf"
/>
<field name="mimetype">application/pdf</field>
</record>

<!-- Demo report for partner model -->
<record id="demo_partner_report" model="ir.actions.report">
<field name="name">Demo Partner Report</field>
<field name="model">res.partner</field>
<field name="report_name">demo_partner_report</field>
<field name="report_type">qweb-pdf</field>
<field name="print_report_name">object.name</field>
</record>

<!-- Demo PDF form configuration -->
<record id="demo_pdf_form" model="report.pdf.form">
<field name="name">Demo PDF Form</field>
<field name="report_id" ref="demo_partner_report" />
<field name="pdf_attachment_id" ref="demo_pdf_attachment" />
<field name="model_id" ref="base.model_res_partner" />
<field name="binding_model_id" ref="base.model_res_partner" />
<field name="binding_type">report</field>
</record>

<!-- Demo field mappings -->
<record id="demo_field_name" model="report.pdf.form.field">
<field name="report_form_id" ref="demo_pdf_form" />
<field name="pdf_field_name">partner_name</field>
<field name="odoo_field_evaluation">dotted_path</field>
<field name="odoo_field_value">name</field>
</record>

<record id="demo_field_email" model="report.pdf.form.field">
<field name="report_form_id" ref="demo_pdf_form" />
<field name="pdf_field_name">partner_email</field>
<field name="odoo_field_evaluation">dotted_path</field>
<field name="odoo_field_value">email</field>
</record>

<record id="demo_field_phone" model="report.pdf.form.field">
<field name="report_form_id" ref="demo_pdf_form" />
<field name="pdf_field_name">partner_phone</field>
<field name="odoo_field_evaluation">dotted_path</field>
<field name="odoo_field_value">phone</field>
</record>

<!-- Demo field mappings with deeper dotted paths -->
<record id="demo_field_company_name" model="report.pdf.form.field">
<field name="report_form_id" ref="demo_pdf_form" />
<field name="pdf_field_name">company_name</field>
<field name="odoo_field_evaluation">dotted_path</field>
<field name="odoo_field_value">company_id.name</field>
</record>

<record id="demo_field_user_login" model="report.pdf.form.field">
<field name="report_form_id" ref="demo_pdf_form" />
<field name="pdf_field_name">user_login</field>
<field name="odoo_field_evaluation">dotted_path</field>
<field name="odoo_field_value">user_id.login</field>
</record>

<record id="demo_field_country_name" model="report.pdf.form.field">
<field name="report_form_id" ref="demo_pdf_form" />
<field name="pdf_field_name">country_name</field>
<field name="odoo_field_evaluation">dotted_path</field>
<field name="odoo_field_value">country_id.name</field>
</record>

<!-- Demo variable -->
<record id="demo_variable_current_date" model="report.pdf.form.variable">
<field name="report_form_id" ref="demo_pdf_form" />
<field name="name">current_date</field>
<field name="code">datetime.datetime.now().strftime('%Y-%m-%d')</field>
</record>
</odoo>
Loading
Loading