.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
====================
Base report fill PDF
====================
This module provides a basic report class that fills pdfs.
Installation
============
Make sure you have ``fdfgen`` Python module installed::
$ pip install fdfgen
For testing it is also necessary ``pdftk`` app installed:
Ubuntu ::
apt-get install pdftk
OSX ::
* Install pdftk (https://www.pdflabs.com/tools/pdftk-server/).
Windows ::
* Install pdftk (https://www.pdflabs.com/tools/pdftk-server/).
Usage
=====
An example of Fill PDF report for partners on a module called `module_name`:
A python class ::
from odoo import models
class PartnerFillPDF(models.AbstractModel):
_name = 'report.module_name.report_name'
_inherit = 'report.report_fillpdf.abstract'
@api.model
def get_original_document_path(self, data, objs):
return get_resource_path(
'report_fillpdf', 'static/src/pdf', 'partner_pdf.pdf')
@api.model
def get_document_values(self, data, objs):
objs.ensure_one()
return {'name': objs.name}
A computed form can be executed modifying the computing function ::
from odoo import models
class PartnerFillPDF(models.AbstractModel):
_name = 'report.module_name.report_name'
_inherit = 'report.report_fillpdf.abstract'
@api.model
def get_form(self, data, objs):
return self.env['ir.attachment'].search([], limit=1)
@api.model
def get_document_values(self, data, objs):
objs.ensure_one()
return {'name': objs.name}
A report XML record ::
<report
id="partner_fillpdf"
model="res.partner"
string="Fill PDF"
report_type="fillpdf"
name="report_fillpdf.partner_fillpdf"
file="res_partner"
attachment_use="False"
/>
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/143/11.0
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 smashing it by providing a detailed and welcomed feedback.
Credits
=======
Contributors
------------
* Enric Tobella <etobella@creublanca.es>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://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 https://odoo-community.org.
Raw data
{
"_id": null,
"home_page": "https://github.com/OCA/reporting-engine",
"name": "odoo14-addon-report-fillpdf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Creu Blanca,Odoo Community Association (OCA)",
"author_email": "support@odoo-community.org",
"download_url": null,
"platform": null,
"description": ".. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg\n :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html\n :alt: License: AGPL-3\n\n====================\nBase report fill PDF\n====================\n\nThis module provides a basic report class that fills pdfs.\n\nInstallation\n============\n\nMake sure you have ``fdfgen`` Python module installed::\n\n$ pip install fdfgen\n\nFor testing it is also necessary ``pdftk`` app installed:\n\nUbuntu ::\n\n apt-get install pdftk\n\nOSX ::\n\n * Install pdftk (https://www.pdflabs.com/tools/pdftk-server/).\n\nWindows ::\n\n * Install pdftk (https://www.pdflabs.com/tools/pdftk-server/).\n\nUsage\n=====\n\nAn example of Fill PDF report for partners on a module called `module_name`:\n\nA python class ::\n\n from odoo import models\n\n class PartnerFillPDF(models.AbstractModel):\n _name = 'report.module_name.report_name'\n _inherit = 'report.report_fillpdf.abstract'\n \n @api.model\n def get_original_document_path(self, data, objs):\n return get_resource_path(\n 'report_fillpdf', 'static/src/pdf', 'partner_pdf.pdf')\n\n @api.model\n def get_document_values(self, data, objs):\n objs.ensure_one()\n return {'name': objs.name}\n\nA computed form can be executed modifying the computing function ::\n\n from odoo import models\n\n class PartnerFillPDF(models.AbstractModel):\n _name = 'report.module_name.report_name'\n _inherit = 'report.report_fillpdf.abstract'\n\n @api.model\n def get_form(self, data, objs):\n return self.env['ir.attachment'].search([], limit=1)\n\n @api.model\n def get_document_values(self, data, objs):\n objs.ensure_one()\n return {'name': objs.name}\n\n\nA report XML record ::\n\n <report\n id=\"partner_fillpdf\"\n model=\"res.partner\"\n string=\"Fill PDF\"\n report_type=\"fillpdf\"\n name=\"report_fillpdf.partner_fillpdf\"\n file=\"res_partner\"\n attachment_use=\"False\"\n />\n\n.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas\n :alt: Try me on Runbot\n :target: https://runbot.odoo-community.org/runbot/143/11.0\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues\n<https://github.com/OCA/reporting-engine/issues>`_. In case of trouble, please\ncheck there if your issue has already been reported. If you spotted it first,\nhelp us smashing it by providing a detailed and welcomed feedback.\n\nCredits\n=======\n\nContributors\n------------\n\n* Enric Tobella <etobella@creublanca.es>\n\nMaintainer\n----------\n\n.. image:: https://odoo-community.org/logo.png\n :alt: Odoo Community Association\n :target: https://odoo-community.org\n\nThis module is maintained by the OCA.\n\nOCA, 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.\n\nTo contribute to this module, please visit https://odoo-community.org.\n\n\n",
"bugtrack_url": null,
"license": "AGPL-3",
"summary": "Base module that fills PDFs",
"version": "14.0.1.0.2.dev4",
"project_urls": {
"Homepage": "https://github.com/OCA/reporting-engine"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c5777c7d12ecc4fbbae8da60791fc0b5cf66b4c5b6814c899444c7f4329e3c49",
"md5": "e7d9a5a93b812f81901c2c3ca62289f3",
"sha256": "071504aa1da5238eb49eb8c558ea9c2fd5f366ac1af21d50fd5a8567305669ca"
},
"downloads": -1,
"filename": "odoo14_addon_report_fillpdf-14.0.1.0.2.dev4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e7d9a5a93b812f81901c2c3ca62289f3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 33685,
"upload_time": "2024-03-31T05:59:20",
"upload_time_iso_8601": "2024-03-31T05:59:20.308133Z",
"url": "https://files.pythonhosted.org/packages/c5/77/7c7d12ecc4fbbae8da60791fc0b5cf66b4c5b6814c899444c7f4329e3c49/odoo14_addon_report_fillpdf-14.0.1.0.2.dev4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-31 05:59:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "OCA",
"github_project": "reporting-engine",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "lxml",
"specs": []
},
{
"name": "mock",
"specs": []
},
{
"name": "openpyxl",
"specs": []
},
{
"name": "py3o.formats",
"specs": []
},
{
"name": "py3o.template",
"specs": []
},
{
"name": "PyPDF2",
"specs": []
},
{
"name": "xlrd",
"specs": []
},
{
"name": "xlsxwriter",
"specs": []
}
],
"lcname": "odoo14-addon-report-fillpdf"
}