I created a custom report in the accounting module a while ago a custom report .. that works quite well .. now what I would like to do is add a button in the header as the one that has by default but that is related to my custom report
<report
id="account_invoices"
model="account.invoice"
string="Factura pre-impresa"
report_type="qweb-pdf"
name="custom_report_module.report_custom_template"
file="custom_report_module.report_custom_template"
attachment_use="True"
attachment="(object.state in ('open','paid')) and
('INV'+(object.number or '').replace('/','')+'.pdf')"
/>
This is what I call my report that appears in the drop-down list, after which I try to add the button but it just doesn't work for me
<record id="my_invoice_tree_inherit" model="ir.ui.view">
<field name="name">account.invoice.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<button name="invoice_print" position="after">
<button name="print_bank_statement" string="Print Statement" type="object" help="Print in Pdf"/>
</button>
</field>
</record>
Some help???