Browse Source
Merge pull request #9 from akretion/py3o-usability
Merge pull request #9 from akretion/py3o-usability
Small usability improvementspull/80/head
Florent Aide
8 years ago
committed by
GitHub
13 changed files with 240 additions and 159 deletions
-
4report_py3o/NEWS
-
18report_py3o/README.md
-
94report_py3o/README.rst
-
19report_py3o/__openerp__.py
-
25report_py3o/models/ir_report.py
-
6report_py3o/models/py3o_server.py
-
2report_py3o/models/py3o_template.py
-
17report_py3o/py3o_parser.py
-
2report_py3o/security/ir.model.access.csv
-
46report_py3o/views/ir_report.xml
-
10report_py3o/views/menu.xml
-
66report_py3o/views/py3o_server.xml
-
90report_py3o/views/py3o_template.xml
@ -1,4 +0,0 @@ |
|||||
report_py3o 1.3 |
|
||||
|
|
||||
Production release |
|
||||
|
|
@ -1,18 +0,0 @@ |
|||||
### README ### |
|
||||
|
|
||||
|
|
||||
### LibreOffice Report Engine for Odoo/OpenERP ### |
|
||||
|
|
||||
|
|
||||
This module allows you to convert any type of report into LibreOffice/OpenOffice. |
|
||||
The benefits is that you have control over your documents and you can |
|
||||
modify them as needed. |
|
||||
|
|
||||
|
|
||||
Requirements |
|
||||
============ |
|
||||
|
|
||||
The py3o.template package is required; install it with: |
|
||||
easy_install -UZ py3o.template |
|
||||
|
|
||||
|
|
@ -0,0 +1,94 @@ |
|||||
|
.. 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 |
||||
|
|
||||
|
=========== |
||||
|
Report Py3o |
||||
|
=========== |
||||
|
|
||||
|
The py3o reporting engine is a reporting engine for Odoo based on `Libreoffice <http://www.libreoffice.org/>`_: |
||||
|
|
||||
|
* the report is created with Libreoffice (ODT or ODS), |
||||
|
* the report is stored on the server in OpenDocument format (.odt or .ods file) |
||||
|
* the report is sent to the user in OpenDocument format or in any output format supported by Libreoffice (PDF, HTML, DOC, DOCX, Docbook, XLS, etc.) |
||||
|
|
||||
|
The key advantages of a Libreoffice-based reporting engine are: |
||||
|
|
||||
|
* no need to be a developper to create or modify a report: the report is created and modified with Libreoffice. So this reporting engine has a fully WYSIWYG report developpment tool! |
||||
|
|
||||
|
* For a PDF report in A4/Letter format, it's easier to develop it with a tool such as Libreoffice that is designed to create A4/Letter documents than to develop it in HTML/CSS. |
||||
|
|
||||
|
* If you want your users to be able to modify the document after its generation by Odoo, just configure the document with ODT output (or DOC or DOCX) and the user will be able to modify the document with Libreoffice (or Word) after its generation by Odoo. |
||||
|
|
||||
|
* Easy development of spreadsheet reports in ODS format (XLS output possible). |
||||
|
|
||||
|
This reporting engine is an alternative to `Aeroo <https://github.com/aeroo/aeroo_reports>`_: these 2 reporting engines have similar features but their codes are completely different. |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
|
||||
|
You must install 2 additionnal python libs: |
||||
|
|
||||
|
.. code:: |
||||
|
|
||||
|
pip install py3o.template |
||||
|
pip install py3o.formats |
||||
|
|
||||
|
If you want to convert the ODT or ODS report in another format, you need several additionnal components and Python libs: |
||||
|
|
||||
|
* `Py3o Fusion server <https://bitbucket.org/faide/py3o.fusion>`_ |
||||
|
* `Py3o render server <https://bitbucket.org/faide/py3o.renderserver>`_ |
||||
|
* Libreoffice started in the background in headless mode. |
||||
|
|
||||
|
TODO : continue |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
|
||||
|
If you want to convert the report in another format, go to the menu *Configuration > Technical > Reports > Py3o > Py3o Servers* and create a new Py3o server with its URL (for example: http://localhost:8765/form). |
||||
|
|
||||
|
TODO: continue |
||||
|
|
||||
|
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/9.0 |
||||
|
|
||||
|
Known issues / Roadmap |
||||
|
====================== |
||||
|
|
||||
|
* generate barcode ? |
||||
|
|
||||
|
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 |
||||
|
------------ |
||||
|
|
||||
|
* Florent Aide (`XCG Consulting <http://odoo.consulting/>`_) |
||||
|
* Laurent Mignon (Acsone) |
||||
|
|
||||
|
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. |
@ -1,31 +1,31 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
<odoo> |
<odoo> |
||||
<data> |
|
||||
|
|
||||
<!-- Inherit from base.act_report_xml_view to add py3o-related settings. --> |
|
||||
|
<!-- Inherit from base.act_report_xml_view to add py3o-related settings. --> |
||||
|
|
||||
<record id="py3o_report_view" model="ir.ui.view"> |
|
||||
<field name="name">py3o_report_view</field> |
|
||||
<field name="model">ir.actions.report.xml</field> |
|
||||
<field name="inherit_id" ref="base.act_report_xml_view" /> |
|
||||
<field name="arch" type="xml"> |
|
||||
|
<record id="py3o_report_view" model="ir.ui.view"> |
||||
|
<field name="name">py3o_report_view</field> |
||||
|
<field name="model">ir.actions.report.xml</field> |
||||
|
<field name="inherit_id" ref="base.act_report_xml_view" /> |
||||
|
<field name="arch" type="xml"> |
||||
|
|
||||
<xpath expr="//page[@name='security']" position="before"> |
|
||||
<page string="LibreOffice template" |
|
||||
attrs="{'invisible': [('report_type', '!=', 'py3o')]}"> |
|
||||
|
<xpath expr="//page[@name='security']" position="before"> |
||||
|
<page string="LibreOffice Template" name="py3o_tab" |
||||
|
attrs="{'invisible': [('report_type', '!=', 'py3o')]}"> |
||||
|
|
||||
<group> |
|
||||
<field name="py3o_filetype" /> |
|
||||
<field name="py3o_is_local_fusion"/> |
|
||||
<field name="py3o_server_id" /> |
|
||||
<field name="py3o_template_id" /> |
|
||||
<field name="module" /> |
|
||||
<field name="py3o_template_fallback" /> |
|
||||
</group> |
|
||||
|
<group name="py3o_params"> |
||||
|
<field name="py3o_filetype" /> |
||||
|
<field name="py3o_is_local_fusion"/> |
||||
|
<field name="py3o_server_id" /> |
||||
|
<field name="py3o_template_id" /> |
||||
|
<field name="module" /> |
||||
|
<field name="py3o_template_fallback" /> |
||||
|
</group> |
||||
|
|
||||
</page> |
|
||||
</xpath> |
|
||||
|
</page> |
||||
|
</xpath> |
||||
|
|
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
</field> |
|
||||
</record> |
|
||||
</data> |
|
||||
</odoo> |
</odoo> |
@ -1,8 +1,8 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<odoo> |
<odoo> |
||||
<data> |
|
||||
<menuitem id="py3o_config_menu" |
|
||||
name="Py3o" |
|
||||
parent="report.reporting_menuitem" /> |
|
||||
</data> |
|
||||
|
|
||||
|
<menuitem id="py3o_config_menu" |
||||
|
name="Py3o" |
||||
|
parent="report.reporting_menuitem" /> |
||||
|
|
||||
</odoo> |
</odoo> |
@ -1,42 +1,38 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<odoo> |
<odoo> |
||||
<data> |
|
||||
<record id="py3o_server_configuration_form_view" model="ir.ui.view"> |
|
||||
<field name="name">py3o.server.configuration.form.view</field> |
|
||||
<field name="model">py3o.server</field> |
|
||||
<field name="arch" type="xml"> |
|
||||
<form string="Py3o Server Configuration" version="7.0"> |
|
||||
<sheet> |
|
||||
<group> |
|
||||
<field name="url" /> |
|
||||
<field name="is_active" /> |
|
||||
</group> |
|
||||
</sheet> |
|
||||
</form> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
|
||||
<record id="py3o_server_configuration_tree_view" model="ir.ui.view"> |
|
||||
<field name="name">py3o.server.configuration.tree.view</field> |
|
||||
<field name="model">py3o.server</field> |
|
||||
<field name="arch" type="xml"> |
|
||||
<tree string="Py3o Server Configuration" version="7.0"> |
|
||||
<field name="url" /> |
|
||||
|
<record id="py3o_server_configuration_form_view" model="ir.ui.view"> |
||||
|
<field name="name">py3o.server.configuration.form.view</field> |
||||
|
<field name="model">py3o.server</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Py3o Server Configuration"> |
||||
|
<group name="main"> |
||||
|
<field name="url" widget="url"/> |
||||
<field name="is_active" /> |
<field name="is_active" /> |
||||
</tree> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
</group> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
<record id="py3o_server_configuration_action" model="ir.actions.act_window"> |
|
||||
<field name="name">py3o.server.configuration.action</field> |
|
||||
<field name="res_model">py3o.server</field> |
|
||||
<field name="view_type">form</field> |
|
||||
<field name="view_mode">tree,form</field> |
|
||||
</record> |
|
||||
|
<record id="py3o_server_configuration_tree_view" model="ir.ui.view"> |
||||
|
<field name="name">py3o.server.configuration.tree.view</field> |
||||
|
<field name="model">py3o.server</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Py3o Servers Configuration"> |
||||
|
<field name="url" /> |
||||
|
<field name="is_active" /> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="py3o_server_configuration_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Py3o Servers</field> |
||||
|
<field name="res_model">py3o.server</field> |
||||
|
<field name="view_mode">tree,form</field> |
||||
|
</record> |
||||
|
|
||||
|
<menuitem id="py3o_server_configuration_menu" |
||||
|
parent="py3o_config_menu" |
||||
|
action="py3o_server_configuration_action" /> |
||||
|
|
||||
<menuitem id="py3o_server_configuration_menu" |
|
||||
name="Py3o Server Configuration" |
|
||||
parent="py3o_config_menu" |
|
||||
action="py3o_server_configuration_action" /> |
|
||||
</data> |
|
||||
</odoo> |
</odoo> |
@ -1,54 +1,54 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<odoo> |
<odoo> |
||||
<data> |
|
||||
<record id="py3o_template_configuration_search_view" model="ir.ui.view"> |
|
||||
<field name="name">py3o.template.configuration.search.view</field> |
|
||||
<field name="model">py3o.template</field> |
|
||||
<field name="arch" type="xml"> |
|
||||
<search string="Py3o Templates Configuration" version="7.0"> |
|
||||
<field name="name" /> |
|
||||
<field name="filetype" /> |
|
||||
</search> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
|
||||
<record id="py3o_template_configuration_form_view" model="ir.ui.view"> |
|
||||
<field name="name">py3o.template.configuration.form.view</field> |
|
||||
<field name="model">py3o.template</field> |
|
||||
<field name="arch" type="xml"> |
|
||||
<form string="Py3o Templates Configuration" version="7.0"> |
|
||||
<sheet> |
|
||||
<group> |
|
||||
<field name="name" /> |
|
||||
<field name="filetype" /> |
|
||||
<field name="py3o_template_data" /> |
|
||||
</group> |
|
||||
</sheet> |
|
||||
</form> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
<record id="py3o_template_configuration_search_view" model="ir.ui.view"> |
||||
|
<field name="name">py3o.template.configuration.search.view</field> |
||||
|
<field name="model">py3o.template</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<search string="Py3o Templates"> |
||||
|
<field name="name" /> |
||||
|
<field name="filetype" /> |
||||
|
<group string="Group By" name="groupby"> |
||||
|
<filter name="filetype_groupby" string="File Type" |
||||
|
context="{'group_by': 'filetype'}"/> |
||||
|
</group> |
||||
|
</search> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
<record id="py3o_template_configuration_tree_view" model="ir.ui.view"> |
|
||||
<field name="name">py3o.template.configuration.tree.view</field> |
|
||||
<field name="model">py3o.template</field> |
|
||||
<field name="arch" type="xml"> |
|
||||
<tree string="Py3o Templates Configuration" version="7.0"> |
|
||||
|
<record id="py3o_template_configuration_form_view" model="ir.ui.view"> |
||||
|
<field name="name">py3o.template.configuration.form.view</field> |
||||
|
<field name="model">py3o.template</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="Py3o Templates"> |
||||
|
<group name="main"> |
||||
<field name="name" /> |
<field name="name" /> |
||||
<field name="filetype" /> |
<field name="filetype" /> |
||||
</tree> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
<field name="py3o_template_data" /> |
||||
|
</group> |
||||
|
</form> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="py3o_template_configuration_tree_view" model="ir.ui.view"> |
||||
|
<field name="name">py3o.template.configuration.tree.view</field> |
||||
|
<field name="model">py3o.template</field> |
||||
|
<field name="arch" type="xml"> |
||||
|
<tree string="Py3o Templates"> |
||||
|
<field name="name" /> |
||||
|
<field name="filetype" /> |
||||
|
</tree> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<record id="py3o_template_configuration_action" model="ir.actions.act_window"> |
||||
|
<field name="name">Py3o Templates</field> |
||||
|
<field name="res_model">py3o.template</field> |
||||
|
<field name="view_mode">tree,form</field> |
||||
|
</record> |
||||
|
|
||||
<record id="py3o_template_configuration_action" model="ir.actions.act_window"> |
|
||||
<field name="name">Py3o Templates Configuration</field> |
|
||||
<field name="res_model">py3o.template</field> |
|
||||
<field name="view_type">form</field> |
|
||||
<field name="view_mode">tree,form</field> |
|
||||
</record> |
|
||||
|
<menuitem id="py3o_template_configuration_menu" |
||||
|
parent="py3o_config_menu" |
||||
|
action="py3o_template_configuration_action" /> |
||||
|
|
||||
<menuitem id="py3o_template_configuration_menu" |
|
||||
name="Py3o Templates" |
|
||||
parent="py3o_config_menu" |
|
||||
action="py3o_template_configuration_action" /> |
|
||||
</data> |
|
||||
</odoo> |
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue