Hi people;
I have did in Financial
module(Menu Customer Invoices
) Two “.fodt” document , and there is just one difference between the two reports domcument1 (action keyword1),with background picture` and document2 (action keyword2),does not contain the background picture.
everything is good in state "draft"
it works (there was 2 actions of printing) but if I post the invoice
and go again to print the document2(action keyword2),Here always printing the document1 otherwise i have click on the action keyword2.
This is the XML code :
<record model="ir.action.report" id="report_invoice">
<field name="name">Invoice</field>
<field name="model">account.invoice</field>
<field name="report_name">account.invoice</field>
<field name="report">account_invoice/invoice.fodt</field>
<field name="extension">pdf</field>
<field name="single" eval="True"/>
</record>
<record model="ir.action.keyword" id="report_invoice_keyword">
<field name="keyword">form_print</field>
<field name="model">account.invoice,-1</field>
<field name="action" ref="report_invoice"/>
</record>
**------This is what i have add to standard XML code ---------**
<record model="ir.action.report" id="report_invoice_1">
<field name="name">Invoice without background</field>
<field name="model">account.invoice</field>
<field name="report_name">account.invoice</field>
<field name="report">account_invoice/invoice_without_background.fodt</field>
<field name="extension">pdf</field>
<field name="single" eval="True"/>
</record>
<record model="ir.action.keyword" id="report_invoice_keyword_1">
<field name="keyword">form_print</field>
<field name="model">account.invoice,-1</field>
<field name="action" ref="report_invoice_1"/>
</record>
I want to know why when the state of the invoice become "posted"
, Although I did the click on the action keyword2
,the reaction was printing the document linked to the action keyword1
?
Thanks in advance.