On 17/12/11 23:36 +0100, Albert Cervera i Areny wrote:
> A Dissabte, 17 de desembre de 2011 18:28:30, Cédric Krier va escriure:
> > 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.
> 
> I don't think I explained correctly. I want users to be able to create and 
> upload their own reports. They can do that by creating a new ir.action.report 
> record, but there's nothing in that record that indicates what "execute" 
> function it should use so there's no smart way I can implement that.

Could you describe exactly how it will work?
Because I thought that such reports were created in JasperReport.

> I need a mechanism by which the JasperReports engine will be called instead 
> of 
> the default relatorio one, and that's why I think I need trytond to be 
> prepared for that.

I think your issue could be solved with a generic wizard. And the user
will just have to create a ir.action.wizard with the corresponding
keywords.

I think we should really think about the benefit of having multiple
report engine (in the Tryton meaning). Because I'm affraid that we will
split the effort through multiple small projects instead of having it on
one (not necessary relatorio if it doesn't fit anymore).
This doesn't mean it is not possible to use something else but if we
have such options, it is opening the doors for such behavior.
Seeing what is happening to OE with their 5 standards + many externals,
it is something that I won't want to see for Tryton. I mean having each
one creating his standard sets of reports for his report engine of
choice.

-- 
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: pgpxrkW8FBQga.pgp
Description: PGP signature

Reply via email to