Howto call same report with different template

11 views
Skip to first unread message

Felipe Alvarez Harnecker

unread,
Feb 23, 2012, 3:13:42 AM2/23/12
to tryto...@googlegroups.com
Hi,

tried this

<record model="ir.action.report" id="report_invoice_report">
<field name="name">Factura Report</field>
<field name="model">account.invoice</field>
<field name="report_name">account.invoice</field>
<field name="report">ql_maquina/invoice.odt</field>
<field name="style">company/header_A4.odt</field>
</record>

but tryton calls this new report with account_invoice/invoice.odt

I want to keep original report so user can choose between them.

thnx.


--
Felipe Alvarez Harnecker
fel...@ql.cl - 9.874.60.17

Cédric Krier

unread,
Feb 23, 2012, 3:59:01 AM2/23/12
to tryto...@googlegroups.com
On 23/02/12 05:13 -0300, Felipe Alvarez Harnecker wrote:
> Hi,
>
> tried this
>
> <record model="ir.action.report" id="report_invoice_report">
> <field name="name">Factura Report</field>
> <field name="model">account.invoice</field>
> <field name="report_name">account.invoice</field>
> <field name="report">ql_maquina/invoice.odt</field>
> <field name="style">company/header_A4.odt</field>
> </record>
>
> but tryton calls this new report with account_invoice/invoice.odt

Where is the Action Keyword "form_print"?
You need to create one for this new report otherwise you can not click
on it.

--
Cédric Krier

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

Felipe Alvarez Harnecker

unread,
Feb 23, 2012, 12:42:22 PM2/23/12
to tryto...@googlegroups.com
On Jueves 23 Febrero 2012 05:59:01 Cédric Krier escribió:
> On 23/02/12 05:13 -0300, Felipe Alvarez Harnecker wrote:
> > Hi,
> >
> > tried this
> >
> > <record model="ir.action.report" id="report_invoice_report">
> >
> > <field name="name">Factura Report</field>
> > <field name="model">account.invoice</field>
> > <field name="report_name">account.invoice</field>
> > <field name="report">ql_maquina/invoice.odt</field>
> > <field name="style">company/header_A4.odt</field>
> >
> > </record>
> >
> > but tryton calls this new report with account_invoice/invoice.odt
>
> Where is the Action Keyword "form_print"?
> You need to create one for this new report otherwise you can not click
> on it.

sorry, here it is

<record model="ir.action.keyword" id="report_invoice_report_keyword">
<field name="keyword">form_print</field>
<field name="model">account.invoice,-1</field>
<field name="action" ref="report_invoice_report"/>
</record>


i can click on each report but "Factura Report" does't use ql_maquina/invoice.odt it uses
account_invoice/invoice.odt

Reply all
Reply to author
Forward
0 new messages