Commit Graph

54 Commits (60b69e56e9dffafa0a1d0c6abe4b791b9c689c01)

Author SHA1 Message Date
OCA-git-bot 9539a69914 Merge PR #490 into 13.0
Signed-off-by dreispt
2021-12-02 15:01:52 +00:00
François Degrave a3585ce3c0
Update py3o_report.py
[FIX] generate a single report with the right extension (if the extension is an OpenDocument type)
2021-03-12 08:58:43 +01:00
François Degrave ad58dab5e2
[FIX] report_py3o: wrong extension for .odt files in zip 2021-03-11 18:52:28 +01:00
hda 365898c459 [13.0][FIX] _py3o_parser_context._old_format_lang useless env param in calling _format_date 2021-01-20 14:59:27 +01:00
sbejaoui 28856886a2 [12.0][FIX] - report_py3o: run libreoffice in an isolated user installation
Bug when more than one conversion print is launched within the same libreoffice instance.

The standard behavior of libreoffice when a user open it while another instance is
running is to show a new window and throw an error if a new instance is forced within
the same user installation [see](https://bugs.documentfoundation.org/show_bug.cgi?id=37531).

This implies a bug in report_py3o module when we call libreoffice at the same time for
different documents.

To reproduce this bug:

**Case 1:**
1.  Simultaneously print two documents.

**Case 2:**
1.  Run print jobs using job_queue module
2.  Manually print another document

**Case 3:**
2.  Open libreoffice
3.  Print a py3o report

This PR creates a temporary user installation for each libreoffice conversion to bypass this limitation.
2020-01-23 15:41:07 +01:00
Russell Briggs c087613b92 Make sure value is always set for computed fields
(without these a CacheMiss error is thrown by odoo)
2019-11-19 15:54:14 +01:00
Laurent Mignon (ACSONE) f584d505a0 [MIG] report_py3o, report_py3o_fusion_server: Migration to 13.0 2019-11-19 15:54:14 +01:00
Laurent Mignon (ACSONE) e644a32572 [IMP] report_py3o, report_py3o_fusion_server: black, isort 2019-11-19 14:36:37 +01:00
Laurent Mignon (ACSONE) e911ba740f [FIX] report_py3o: Access to ir.config_parameter with sudo 2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) dfbe696bd8 [IMP] py3o_report: Allow to specify the lang when calling o_format_lang
lang_code is already supported by o_format_date
2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) a98f1bb4c3 [FIX] report_py3o: Add missing 'user' and 'lang' into the parser context 2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) 68da7235c2 [IMP][FIX] py3o_report, py3o_report_fusion_server: Compute the availability of py3o report
Before this change it was not possible to install modules declaring py3o report into a non native format without specifying a Fusion server once the module py3o_report_fusion_server was installed. With theses changes, we now take care of the availability of the libreoffice runtime to display/log a warning message when the report is in a non native runtime.
2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) 00b3ec1afa [FIX] report_py3o: Add missing method _merge_pdf.
This method was previously provided by Odoo and is used to merge all the reports generated if the generation is called for more than one record
2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) bff9e485bb [IMP] report_py3o: remove obsolete methods 2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) 82dbee0cd6 [FIX] report_py3o: Use the right naming convention for the render method
To determine the method to use to render a recport according to its type, the generic method 'render' defined into ir.action.report check if a method name  is defined on the model. https://github.com/odoo/odoo/blob/12.0/odoo/addons/base/models/ir_actions_report.py#L734
Therefore, we must provide this method to be compliant with what's expected by Odoo.
This change will also allows the usage of py3o template with mail_template once https://github.com/odoo/odoo/pull/30013 will be merged
2019-11-19 14:23:48 +01:00
Gilles Meyomesse 25896130b1 [12.0][MIG] improvement py3o_report_extender 2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) e5382823b0 [MIG] report_py3o, report_py3o_fusion_server: Migration to 12.0 2019-11-19 14:23:48 +01:00
Holger Brunn d4707c5313 [IMP] check for template data, not for the id 2019-11-19 14:23:48 +01:00
jesusVMayor 9ed8257f31 [FIX]report_py3o: Escape correctly html characters. 2019-11-19 14:23:48 +01:00
Holger Brunn 095f710517 [FIX] fallback to libreoffice conversion when no server is configured
fixes #200
2019-11-19 14:23:48 +01:00
Holger Brunn a6d23298b2 [RFR] split off the fusion server to its own module
use libreoffice for conversions in the base version. Fixes #179
2019-11-19 14:23:48 +01:00
Omar f66bbd6275 [FIX] report_py3o: Import new dependencies in try...except 2019-11-19 14:23:48 +01:00
Omar 5708c1b165 [FIX] report_py3o: Removes api.one 2019-11-19 14:23:48 +01:00
omar7r 604e11fb14 [FIX] Deletes an unnecessary function call 2019-11-19 14:23:48 +01:00
Omar 0cb4dcc777 [IMP] report_py3o: Allows to interpret \n and \t in texts, cleans html tags too 2019-11-19 14:23:48 +01:00
Laurent Mignon 16be57e7d3 [IMP] report_py3o: Take into account print_report_name
If a Printed Report Name is set on the action report, use it as
downloaded filename
refs #133
2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) 4730c9fe53 [FIX] report_py3o: must return the path to the report
refs #119
2019-11-19 14:23:48 +01:00
Alexis de Lattre 0a6f32d1fc Add option py3o_multi_in_one for Py3o reports 2019-11-19 14:23:48 +01:00
Guewen Baconnier 54248ddea1 Pass option for escaping False values to server
Needs https://bitbucket.org/faide/py3o.fusion/pull-requests/1
2019-11-19 14:23:48 +01:00
Guewen Baconnier 9ad06ad2a9 Fix py3o freeze when using server fusion
The template file has been partially read for the parsing of the
expressions, so use the original template data instead.  When the fusion
server receives an incomplete template, we don't receive any answer
back.
2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) ab7c0b4f36 [IMP] report_py3o: prevent injections when retrieving the template from path 2019-11-19 14:23:48 +01:00
Alexis de Lattre b56f430e64 [FIX] delete PDF invoice attachment on invoice back to draft (native feature now working with py3o) 2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) 9b3aef021c [FIX] report_py3o: fix exception when report must be saved as attachement
The mehtod  must be called with a list of ids not with a list of browse records
2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) 5f50f781a6 [IMP] Allow to override/extend the way we get the fallback template 2019-11-19 14:23:48 +01:00
Jonathan Nemry (ACSONE) 15882b3ba5 * travis.yml
* flake8
2019-11-19 14:23:48 +01:00
Laurent Mignon b0fe0b14f4 [IMP] Minimizes memory consumption
Conflicts:
	report_py3o/models/py3o_report.py
2019-11-19 14:23:48 +01:00
Jonathan Nemry (ACSONE) b43caf05aa [FIX] imports 2019-11-19 14:23:48 +01:00
Laurent Mignon 990e66123a [IMP] Replace old style parser by TransientModel
The goal is to improve the modularity by making the parser a true inheritable odoo model and share part of the code with the 'report' model

Conflicts:
	report_py3o/models/ir_actions_report_xml.py
	report_py3o/models/py3o_report.py
	report_py3o/tests/test_report_py3o.py
2019-11-19 14:23:48 +01:00
Alexis de Lattre 4636bd38bd PEP8 fix 2019-11-19 14:23:48 +01:00
Alexis de Lattre ebe80d514b Port report_py3o to Odoo v10 2019-11-19 14:23:48 +01:00
Laurent Mignon (ACSONE) f9d3aa6487 [FIX] Check constrains only if report_type == 'py3o' 2019-11-19 14:23:48 +01:00
Laurent Mignon d8d652e9d8 Add more tests and fixes issues found by tests 2019-11-19 14:23:48 +01:00
Laurent Mignon 5017b759fa rename module ir_report to ir_actions_report_xml 2019-11-19 14:23:48 +01:00
Laurent Mignon fd36ac120b Replace plain SQL by orm 2019-11-19 14:23:48 +01:00
Alexis de Lattre 15a8a2e5ec Take into accounts most remarks of @lasley
Remove <data> in views
Protect import of py3o libs
Remove dep on base module
Other small changes
2019-11-19 14:23:48 +01:00
Alexis de Lattre d5ce2246a9 Small usability improvements
Replace README.md by README.rst (not finished)
2019-11-19 14:23:48 +01:00
Laurent Mignon 22bff734d7 Add simple tests and fix call to fusion server 2019-11-19 14:23:48 +01:00
Florent AIDE e895553c2f fixed missing comma in model definition 2019-11-19 14:23:48 +01:00
Laurent Mignon 35b43947f5 Improve filetype selection name 2019-11-19 14:23:48 +01:00
Laurent Mignon 980ca9c12c [IMP] Allow user to use local fusion 2019-11-19 14:23:48 +01:00