On 19 Dec 19:30, Nicolas Évrard wrote: > Hello, > > Last week I took some time to change a bit the API of the Report > object. There has always been a need some part of this API that I did > not like eg: I had the impression that the separation between the data > processing part and the rendering part was not clearly defined. > > So I took a peak at the re-implementation of the Report to support > html templating with webkit or pisa (from OpenLabs and Grasbauer > respectively) and also the JasperReport implementation from NaNtiC. > > In the end here is the review: > > http://codereview.tryton.org/8831002/ > > So I added those methods: > > - get_localcontext: it should be used to make the data processing > part. In theory our modules should only override this method
Do we need to keep the name localcontext? Maybe it is also the time to remove most of the default values set. And also refactor and rename formatLang because it is also an odd code. > - render_report: which is the method that leverage the report > engine to create the report data Why not just 'render'? > - test_postprocess: Test whether or not the report data should be > postprocessed (think about odt -> doc or html -> pdf) Why do we need a test_postprocess? We could call postprocess always and if nothing needs to be done, it does nothing. > - postprocess: Make the necessary calls to postprocess the data > (calling unoconv, pisa, …) Maybe 'convert' is a better name. We could also remove compatibility from very old relatorio version. -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
pgpqOlIkqPkjo.pgp
Description: PGP signature
