-
Notifications
You must be signed in to change notification settings - Fork 3
10.0 refactor py3o jne #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
10.0 refactor py3o jne #2
Conversation
|
@alexis-via @JonathanNEMRY I'll refactor a little bit more to avoid too much memory consumption.. |
report_py3o/models/py3o_report.py
Outdated
| res = fd.read() | ||
| self._postprocess_report( | ||
| res, model_instance.id, save_in_attachment) | ||
| return res, "." + self.ir_actions_report_xml_id.py3o_filetype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fear you re-introduced the "double dot in filename" bug, that I fixed with this commit b702d15
Did you test it this PR and check the filenames of the py3o reports generated ?
|
@lmignon OK. So I understand I should wait for more commits from you guys before merging this PR. Good luck for your optimisations. |
|
@alexis-via Yes you are right. The optimisation is to always use files in the generation process and only at the end load the file into memory since it's what odoo expect... In the same time it become possible to override the postprocess method if you need to add a digital signature to your generated document for exemple. The posprocess mehod will be proposed to odoo on 'report' and if accepted by odoo we finally have a point of extension also for the generated qweb reports. You can also see that when the report is launched on a set of records I return a merged pdf if the result is pdf or a zip file with all the generated reports... |
|
@JonathanNEMRY @alexis-via My improvements are there... faide@9befca9 |
|
Just drop me a note when I can merge. I'll have several go-live on 1st January with report_py3o, so if we merge this before Jan 1st, it will be a good "live test" :) |
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
Conflicts: report_py3o/models/py3o_report.py
441483d to
f592b75
Compare
* flake8
Current coverage is 77.51% (diff: 77.52%)
|
f7834fa to
9c82eec
Compare
9c82eec to
4048c0b
Compare
|
@lmignon tell me when you want me to merge this. |
|
@lmignon sorry for the ping on the Wrong PR. Can we merge this one in the main PR ? or do you need more time on this ? |
|
@faide yes you can! |
|
Merci @alexis-via ! |
This PR applies same changes than faide#14
cc @alexis-via