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.

42 lines
1.9 KiB

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