# Is It correct to make 2 actions Printing 2 different documents linked to same model?

**URL:** https://discuss.tryton.org/t/is-it-correct-to-make-2-actions-printing-2-different-documents-linked-to-same-model/4677
**Category:** Developer
**Created:** [October 1, 2021, 6:41pm UTC](https://discuss.tryton.org/t/is-it-correct-to-make-2-actions-printing-2-different-documents-linked-to-same-model/4677 "2021-10-01T18:41:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![aso](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/a/f04885/32.png) [@aso](https://discuss.tryton.org/u/aso)
#### Post date: [October 1, 2021, 6:41pm UTC](https://discuss.tryton.org/t/is-it-correct-to-make-2-actions-printing-2-different-documents-linked-to-same-model/4677/1 "2021-10-01T18:41:50Z")

</div>

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 :

```auto

        <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.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [October 1, 2021, 10:06pm UTC](https://discuss.tryton.org/t/is-it-correct-to-make-2-actions-printing-2-different-documents-linked-to-same-model/4677/2 "2021-10-01T22:06:17Z")

</div>

It is OK but not for the invoice because the system store a copy of the posted invoice report for legal needs. And it will only return this stored report after that.  
So there could be only one template for the invoice.
