You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
2.0 KiB

  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <record id="act_analytic_invoices" model="ir.actions.act_window">
  5. <field name="context">{'search_default_analytic_account_ids':
  6. [active_id], 'default_analytic_account_ids': active_id}</field>
  7. <field name="name">Invoices</field>
  8. <field name="res_model">account.invoice</field>
  9. <field name="domain">[('analytic_account_ids','=',active_id)]</field>
  10. <field name="search_view_id" ref="account.view_account_invoice_filter" />
  11. </record>
  12. <record id="action_contract_show_invoice_tree" model="ir.actions.act_window.view">
  13. <field name="sequence" eval="1"/>
  14. <field name="view_mode">tree</field>
  15. <field name="view_id" ref="account.invoice_tree"/>
  16. <field name="act_window_id" ref="act_analytic_invoices"/>
  17. </record>
  18. <record id="action_contract_show_invoice_form" model="ir.actions.act_window.view">
  19. <field name="sequence" eval="2"/>
  20. <field name="view_mode">form</field>
  21. <field name="view_id" ref="account.invoice_form"/>
  22. <field name="act_window_id" ref="act_analytic_invoices"/>
  23. </record>
  24. <record id="account_analytic_account_button_invoice" model="ir.ui.view">
  25. <field name="name">account.analytic.account.button.invoice
  26. </field>
  27. <field name="model">account.analytic.account</field>
  28. <field name="inherit_id" ref="analytic.view_account_analytic_account_form" />
  29. <field name="arch" type="xml">
  30. <xpath expr='//div[@name="button_box"]' position='inside'>
  31. <button class="oe_stat_button" type="action" icon="fa-edit"
  32. name="%(contract_show_invoice.act_analytic_invoices)d"
  33. string="Invoices" help="Invoices related with this contract">
  34. </button>
  35. </xpath>
  36. </field>
  37. </record>
  38. </data>
  39. </openerp>