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.

49 lines
2.2 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. help="Invoices related with this contract">
  33. <div class="o_form_field o_stat_info">
  34. <span class="o_stat_value">
  35. <field name="total_invoiced" widget="monetary"
  36. options="{'currency_field': 'currency_id'}"/>
  37. </span>
  38. <span class="o_stat_text">Invoiced</span>
  39. </div>
  40. </button>
  41. </xpath>
  42. </field>
  43. </record>
  44. </odoo>