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

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