On 17/12/11 16:59 +0100, Albert Cervera i Areny wrote:
> * Engine *
> 
> We miss an 'engine' field in ir.action.report for both translations and also 
> to 
> make jasper_reports first class citizens. In order to use jasper reports we 
> must declar the action in the XML but *also* we must add a class:
> 
> from jasper import JasperReport
> 
> class SampleReport(JasperReport):
>     _name = 'jasper_reports.sample'
> SampleReport()
> 
> I think we could add an 'engine' field of type Selection to ir.action.report 
> that allowed default Report class decide which engine it should execute. 
> That'd mean:
> 
> - By default (in trytond) engine field only has one entry: 'relatorio'.
> - Report class is made much more simple and just checks which engine it must 
> use and calls the engine 'execute' function.
> - We create a RelatorioReport class that contains current Report 
> functionality.
> - There's still the issue of what is the smartest way to register new report 
> engines to the system so that Report can make the appropriate call.

I find this pointless. The engine is just define in the Report class and
a user can not change it.

> * Actions *
> 
> We find ir.action.report is too tight to relatorio. Fields like 
> 'template_extension', 'style' or the long list of extensions are a good 
> example of that.

Of course, it is the standard way.

> I'm not very sure how we should improve that, the simplest option is to add 
> the 'engine' field mentioned above in trytond, add all the fields we need in 
> the 
> jasper_reports module and when the engine is 'jasper' simply hide all 
> unnecessary fields.

You can inherit ir.action.report in a custom module to hide them.

By the way, I don't understand very well why such integration of
JasperReport. I thought that it was a report engine for BI but Report in
Tryton (and also in OE) are just document generation (perhaps we should
think about better name).
So as BI engine, it doesn't really need to be inside Tryton.

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpDkF7TQnzx5.pgp
Description: PGP signature

Reply via email to