mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[UPD] README.rst
This commit is contained in:
committed by
Laurent Mignon (ACSONE)
parent
c9ecc66438
commit
8e41fe8a9a
@@ -1,10 +1,29 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
==================
|
||||
Py3o Report Engine
|
||||
==================
|
||||
|
||||
===========
|
||||
Report Py3o
|
||||
===========
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
:alt: Beta
|
||||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/reporting-engine/tree/12.0/report_py3o
|
||||
: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-12-0/reporting-engine-12-0-report_py3o
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/143/12.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
The py3o reporting engine is a reporting engine for Odoo based on `Libreoffice <http://www.libreoffice.org/>`_:
|
||||
|
||||
@@ -23,6 +42,11 @@ This module *report_py3o* is the base module for the Py3o reporting engine. If u
|
||||
|
||||
This reporting engine is an alternative to `Aeroo <https://github.com/aeroo-community/aeroo_reports>`_: these two reporting engines have similar features but their implementation is entirely different. You cannot use aeroo templates as drop in replacement though, you'll have to change a few details.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
@@ -49,7 +73,7 @@ For example, to replace the native invoice report by a custom py3o report, add t
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account.account_invoices" model="ir.actions.report.xml">
|
||||
<record id="account.account_invoices" model="ir.actions.report">
|
||||
<field name="report_type">py3o</field>
|
||||
<field name="py3o_filetype">odt</field>
|
||||
<field name="module">my_custom_module_base</field>
|
||||
@@ -69,7 +93,7 @@ the path to the template as *py3o_template_fallback*.
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account.account_invoices" model="ir.actions.report.xml">
|
||||
<record id="account.account_invoices" model="ir.actions.report">
|
||||
<field name="report_type">py3o</field>
|
||||
<field name="py3o_filetype">odt</field>
|
||||
<field name="py3o_template_fallback">/odoo/templates/py3o/report/account_invoice.odt</field>
|
||||
@@ -96,7 +120,7 @@ If you want an invoice in PDF format instead of ODT format, the XML file should
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="account.account_invoices" model="ir.actions.report.xml">
|
||||
<record id="account.account_invoices" model="ir.actions.report">
|
||||
<field name="report_type">py3o</field>
|
||||
<field name="py3o_filetype">pdf</field>
|
||||
<field name="module">my_custom_module_base</field>
|
||||
@@ -112,7 +136,7 @@ If you want to add a new py3o PDF report (and not replace a native report), the
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="partner_summary_report" model="ir.actions.report.xml">
|
||||
<record id="partner_summary_report" model="ir.actions.report">
|
||||
<field name="name">Partner Summary</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="report_name">res.partner.summary</field>
|
||||
@@ -120,20 +144,15 @@ If you want to add a new py3o PDF report (and not replace a native report), the
|
||||
<field name="py3o_filetype">pdf</field>
|
||||
<field name="module">my_custom_module_base</field>
|
||||
<field name="py3o_template_fallback">report/partner_summary.odt</field>
|
||||
</record>
|
||||
|
||||
<!-- Add entry in "Print" drop-down list -->
|
||||
<record id="button_partner_summary_report" model="ir.values">
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="name">Partner Summary</field>
|
||||
<field name="value" eval="'ir.actions.report.xml,%d'%partner_summary_report" />
|
||||
<!-- Add entry in "Print" drop-down list -->
|
||||
<field name="binding_type">report</field>
|
||||
<field name="binding_model_id" ref="base.model_res_partner"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
|
||||
Configuration parameters
|
||||
------------------------
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
py3o.conversion_command
|
||||
The command to be used to run the conversion, ``libreoffice`` by default. If you change this, whatever you set here must accept the parameters ``--headless --convert-to $ext $file`` and put the resulting file into ``$file``'s directory with extension ``$ext``. The command will be started in ``$file``'s directory.
|
||||
@@ -141,14 +160,10 @@ py3o.conversion_command
|
||||
Usage
|
||||
=====
|
||||
|
||||
.. 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/10.0
|
||||
|
||||
The templating language is `extensively documented <http://py3otemplate.readthedocs.io/en/latest/templating.html>`_, the records are exposed in libreoffice as ``objects``, on which you can also call functions.
|
||||
|
||||
Available functions and objects
|
||||
-------------------------------
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
user
|
||||
Browse record of current user
|
||||
@@ -164,9 +179,6 @@ time
|
||||
Python's ``time`` module
|
||||
display_address(partner)
|
||||
Return a formatted string of the partner's address
|
||||
formatLang(value, digits=None, date=False, date_time=False, grouping=True, monetary=False, dp=False, currency_obj=False)
|
||||
Return a formatted numeric, monetary, date or time value according to the context language and timezone
|
||||
(old implementation kept for compatibility and ease migration)
|
||||
o_format_lang(value, lang_code=False, digits=None, grouping=True, monetary=False, dp=False, currency_obj=False, no_break_space=True)
|
||||
Return a formatted numeric or monetary value according to the context language and timezone
|
||||
o_format_date(value, lang_code=False, date_format=False)
|
||||
@@ -174,9 +186,9 @@ o_format_date(value, lang_code=False, date_format=False)
|
||||
|
||||
|
||||
Sample report templates
|
||||
-----------------------
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Sample py3o report templates for the main Odoo native reports (invoice, sale order, purchase order, picking, ...) are available on the Github project `odoo-py3o-report-templates <https://github.com/akretion/odoo-py3o-report-templates>`_.
|
||||
Sample py3o report templates for the main Odoo native reports (invoice, sale order, purchase order, picking, etc.) are available on the Github project `odoo-py3o-report-templates <https://github.com/akretion/odoo-py3o-report-templates>`_.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
@@ -188,16 +200,24 @@ Known issues / Roadmap
|
||||
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.
|
||||
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 <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_py3o%0Aversion:%2012.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
|
||||
~~~~~~~
|
||||
|
||||
* XCG Consulting
|
||||
* ACSONE SA/NV
|
||||
|
||||
Contributors
|
||||
------------
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Florent Aide (`XCG Consulting <http://odoo.consulting/>`_)
|
||||
* Laurent Mignon <laurent.mignon@acsone.eu>,
|
||||
@@ -206,18 +226,19 @@ Contributors
|
||||
* Omar Castiñeira <omar@comunitea.com>
|
||||
* Holger Brunn <hbrunn@therp.nl>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
This module is maintained by the OCA.
|
||||
|
||||
.. 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.
|
||||
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/12.0/report_py3o>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
Reference in New Issue
Block a user