mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract_show_invoice: more lightweight solution In order to implement the button, it's not necessary to have a heavy stored computed field. So I propose to remove it.
30 lines
1.3 KiB
XML
30 lines
1.3 KiB
XML
<?xml version="1.0"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<record id="act_analytic_invoices" model="ir.actions.act_window">
|
|
<field name="name">Invoices</field>
|
|
<field name="res_model">account.invoice</field>
|
|
<field name="domain">[('invoice_line.account_analytic_id','=',active_id)]</field>
|
|
<field name="view_id" ref="account.invoice_tree" />
|
|
<field name="search_view_id" ref="account.view_account_invoice_filter" />
|
|
</record>
|
|
|
|
<record id="account_analytic_account_button_invoice" model="ir.ui.view">
|
|
<field name="name">account.analytic.account.button.invoice
|
|
</field>
|
|
<field name="model">account.analytic.account</field>
|
|
<field name="inherit_id" ref="analytic.view_account_analytic_account_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr='//div[@name="buttons"]' position='inside'>
|
|
<button class="oe_stat_button" type="action" icon="fa-edit"
|
|
name="%(contract_show_invoice.act_analytic_invoices)d"
|
|
string="Invoices" help="Invoices related with this contract">
|
|
</button>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</data>
|
|
</openerp>
|