sbejaoui
0144e53301
[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.
2023-03-24 13:41:50 +01:00
Russell Briggs
fe3217a40d
Make sure value is always set for computed fields
...
(without these a CacheMiss error is thrown by odoo)
2023-03-24 13:41:50 +01:00
Laurent Mignon (ACSONE)
ffb2037aa4
[MIG] report_py3o, report_py3o_fusion_server: Migration to 13.0
2023-03-24 13:41:50 +01:00
Laurent Mignon (ACSONE)
9c04807e1e
[IMP] report_py3o, report_py3o_fusion_server: black, isort
2023-03-24 13:41:50 +01:00
Laurent Mignon (ACSONE)
1ea9e51d4f
[FIX] report_py3o: Access to ir.config_parameter with sudo
2023-03-24 13:41:50 +01:00
Laurent Mignon (ACSONE)
c589c08ec4
[IMP] py3o_report: Allow to specify the lang when calling o_format_lang
...
lang_code is already supported by o_format_date
2023-03-24 13:41:50 +01:00
Laurent Mignon (ACSONE)
1a10a92c4d
[FIX] report_py3o: Add missing 'user' and 'lang' into the parser context
2023-03-24 13:41:50 +01:00
Laurent Mignon (ACSONE)
377ec32b70
[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.
2023-03-24 13:41:50 +01:00
Laurent Mignon (ACSONE)
80406c89b4
[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
2023-03-24 13:41:50 +01:00
Laurent Mignon (ACSONE)
626aeb2ec1
[IMP] report_py3o: remove obsolete methods
2023-03-24 13:41:49 +01:00
Laurent Mignon (ACSONE)
bfe2127b1b
[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
2023-03-24 13:41:49 +01:00
Gilles Meyomesse
e836c851df
[12.0][MIG] improvement py3o_report_extender
2023-03-24 13:41:49 +01:00
Laurent Mignon (ACSONE)
88e53b3ccd
[MIG] report_py3o, report_py3o_fusion_server: Migration to 12.0
2023-03-24 13:41:49 +01:00
Holger Brunn
8308147795
[IMP] check for template data, not for the id
2023-03-24 13:41:49 +01:00
jesusVMayor
74c0c6429d
[FIX]report_py3o: Escape correctly html characters.
2023-03-24 13:41:49 +01:00
Holger Brunn
50f903086e
[FIX] fallback to libreoffice conversion when no server is configured
...
fixes #200
2023-03-24 13:41:49 +01:00
Holger Brunn
61e3909603
[RFR] split off the fusion server to its own module
...
use libreoffice for conversions in the base version. Fixes #179
2023-03-24 13:41:49 +01:00
Omar
41ab72aad8
[FIX] report_py3o: Import new dependencies in try...except
2023-03-24 13:41:49 +01:00
Omar
ce7001e35d
[FIX] report_py3o: Removes api.one
2023-03-24 13:41:49 +01:00
omar7r
0e9506b349
[FIX] Deletes an unnecessary function call
2023-03-24 13:41:49 +01:00
Omar
77f42ed173
[IMP] report_py3o: Allows to interpret \n and \t in texts, cleans html tags too
2023-03-24 13:41:49 +01:00
Laurent Mignon
622420d7c6
[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
2023-03-24 13:41:49 +01:00
Laurent Mignon (ACSONE)
8a5f6bb2f4
[FIX] report_py3o: must return the path to the report
...
refs #119
2023-03-24 13:41:49 +01:00
Alexis de Lattre
e548439209
Add option py3o_multi_in_one for Py3o reports
2023-03-24 13:41:49 +01:00
Guewen Baconnier
be3f68a892
Pass option for escaping False values to server
...
Needs https://bitbucket.org/faide/py3o.fusion/pull-requests/1
2023-03-24 13:41:49 +01:00
Guewen Baconnier
1918272567
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.
2023-03-24 13:41:49 +01:00
Laurent Mignon (ACSONE)
a0240b0b53
[IMP] report_py3o: prevent injections when retrieving the template from path
2023-03-24 13:41:49 +01:00
Alexis de Lattre
8845b3c1b8
[FIX] delete PDF invoice attachment on invoice back to draft (native feature now working with py3o)
2023-03-24 13:41:49 +01:00
Laurent Mignon (ACSONE)
daae2220ac
[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
2023-03-24 13:41:49 +01:00
Laurent Mignon (ACSONE)
10ca85462d
[IMP] Allow to override/extend the way we get the fallback template
2023-03-24 13:41:49 +01:00
Jonathan Nemry (ACSONE)
505d2320b9
* travis.yml
...
* flake8
2023-03-24 13:41:49 +01:00
Laurent Mignon
b4737a131f
[IMP] Minimizes memory consumption
...
Conflicts:
report_py3o/models/py3o_report.py
2023-03-24 13:41:49 +01:00
Jonathan Nemry (ACSONE)
341375d622
[FIX] imports
2023-03-24 13:41:49 +01:00
Laurent Mignon
8a55bdfae7
[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
2023-03-24 13:41:49 +01:00
Alexis de Lattre
eda97dd651
PEP8 fix
2023-03-24 13:41:49 +01:00
Alexis de Lattre
a6ecaf2a46
Port report_py3o to Odoo v10
2023-03-24 13:41:49 +01:00
Laurent Mignon (ACSONE)
5dd8ac4063
[FIX] Check constrains only if report_type == 'py3o'
2023-03-24 13:41:49 +01:00
Laurent Mignon
50037e8cbb
Add more tests and fixes issues found by tests
2023-03-24 13:41:49 +01:00
Laurent Mignon
a205c00413
rename module ir_report to ir_actions_report_xml
2023-03-24 13:41:49 +01:00
Laurent Mignon
1f5a66cd3a
Replace plain SQL by orm
2023-03-24 13:41:49 +01:00
Alexis de Lattre
99adcf39ac
Take into accounts most remarks of @lasley
...
Remove <data> in views
Protect import of py3o libs
Remove dep on base module
Other small changes
2023-03-24 13:41:49 +01:00
Alexis de Lattre
6e91d017e9
Small usability improvements
...
Replace README.md by README.rst (not finished)
2023-03-24 13:41:49 +01:00
Laurent Mignon
0f5bc2a8f1
Add simple tests and fix call to fusion server
2023-03-24 13:41:49 +01:00
Florent AIDE
0833650716
fixed missing comma in model definition
2023-03-24 13:41:49 +01:00
Laurent Mignon
2389ebffe0
Improve filetype selection name
2023-03-24 13:41:49 +01:00
Laurent Mignon
49c29dc764
[IMP] Allow user to use local fusion
2023-03-24 13:41:49 +01:00
Laurent Mignon
a4cea21ecc
[IMP] Add the possiblity to get the template from an absolute path on the server
2023-03-24 13:41:49 +01:00
Laurent Mignon
9aa0227c52
Remove unicode string
2023-03-24 13:41:49 +01:00
Laurent Mignon
948483a858
[IMP] New API + Short Hearder
2023-03-24 13:41:49 +01:00
Laurent Mignon
dbc855cf8a
Move to report_py3o after import from HG
2023-03-24 13:41:49 +01:00