On 22 Dec 15:50, Nicolas Évrard wrote:
> * Cédric Krier  [2014-12-20 02:02 +0100]:
> >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?
> 
> Genshi use the name context, and I think the localcontext name was
> introduced in order not to mix with tryton's context.
> 
> Jinja and Chameleon use also the name context.
> 
> In fact the 'local' part is what bothers me, report_context is better
> according to me.

OK for report_context.

> >Maybe it is also the time to remove most of the default values set.
> 
> What is used currently:
> 
>    - records
>    - setLang
>    - user
>    - formatLang
>    - datetime
>    - time
> 
> I think that datetime / time should be removed though and added when
> needed (and probably only datetime should be used since time is too
> low level).
> 
> What could be removed:
> 
>    - data
>    - context

Both could be useful.

>    - StringIO
> 
> I wonder why StringIO is there in fact.
> 
> >And also refactor and rename formatLang because it is also an odd code.
> 
> Can you elaborate?

It doesn't follow the standard naming and it is a tote method.


-- 
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Attachment: pgp26K6auHqii.pgp
Description: PGP signature

Reply via email to