Skip to content

Conversation

@lmignon
Copy link

@lmignon lmignon commented Dec 17, 2016

The code is not yet functional but I make a PR to share what I'm doing to improve the modularity of custom parser...
IMO we should also replace thee the rml_parse instance as parser context by a new one since it's written for the old api and has a lot of useless methods..
@faide @alexis-via your advices/comments are welcome.
I'll squash the commit once the work will be done

@lmignon lmignon force-pushed the 9.0-refactor_py3o-lmi branch 5 times, most recently from be8f615 to 14f1548 Compare December 19, 2016 12:17
@lmignon lmignon force-pushed the 9.0-refactor_py3o-lmi branch from 14f1548 to 51c20af Compare December 19, 2016 13:32
@lmignon
Copy link
Author

lmignon commented Dec 19, 2016

@faide @alexis-via This PR is ready for review and works fine.... IMO I've improved a lot the modularity of this module and it's now easy to extend the parser to for exemple post process the generated document....
A new enhancement is when the generation is launched from a list of selected items, if the expected format is not pdf, the generated reports are returned in a zip file.

@lmignon lmignon changed the title WIP 9.0 refactor py3o lmi 9.0 refactor py3o lmi Dec 19, 2016
@lmignon lmignon force-pushed the 9.0-refactor_py3o-lmi branch 3 times, most recently from b89cd78 to 506bcab Compare December 19, 2016 14:09
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
@lmignon lmignon force-pushed the 9.0-refactor_py3o-lmi branch from 0aa7ea3 to 9befca9 Compare December 23, 2016 14:17
@lmignon
Copy link
Author

lmignon commented Dec 23, 2016

@faide I've improved the memory consumption a lot when generating a lot of reports

@JonathanNEMRY
Copy link

JonathanNEMRY commented Jan 10, 2017

👍

@lmignon
Copy link
Author

lmignon commented Jan 25, 2017

@alexis-via @faide What do you think about this refactoring? We have more and more client using this code in production and we've started to extend the module based on this new design to provide an alternative way to store the generated report.

@faide
Copy link
Owner

faide commented Jan 25, 2017

I like it :p

@lmignon
Copy link
Author

lmignon commented Jan 25, 2017

@faide I'll also include acsone@4048c0b (v10)
to improve the extensibility of the way to get the template

@faide
Copy link
Owner

faide commented Jan 26, 2017

Ok.
I added a small comment to acsone@4048c0b

@lmignon
Copy link
Author

lmignon commented Jan 26, 2017

@faide Ok I'll fix It. Thank you for the review

@lmignon
Copy link
Author

lmignon commented Feb 17, 2017

@faide The last commit is the back port of the last changes into the 10.0 OCA#78 Therefore 9.0 and 10.0 are equals on a functional point of view.

@lmignon lmignon force-pushed the 9.0-refactor_py3o-lmi branch from 7576867 to e662a1a Compare February 17, 2017 07:18
@lmignon lmignon force-pushed the 9.0-refactor_py3o-lmi branch from 9a6e276 to e662a1a Compare February 17, 2017 13:35
@lmignon
Copy link
Author

lmignon commented Feb 17, 2017

@faide @alexis-via I've experienced a lot of troubles in case of errors when generating a py3o report. (screen lacked in 'waiting' with FF, csrf errors with Chrome). To avoid these errors I had to implement a dedicated web controller to correctly handle the errors and return a response to the web client into the expected format. I don't know if it's the best solution nor the right way to fix this problem. Nevertheless the code can be found here https://github.com/acsone/reporting-engine/commits/9.0-refactor_py3o_controller-lmi (acsone@efccf5c)
These changes makes report_py3o no more compatible with report_custom_filename. Therefore I've developed a glue module.. https://github.com/acsone/reporting-engine/commits/9.0-report_py3o_custom_filename-lmi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants