Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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