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.

60 lines
2.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), ('type','in', ['out_invoice', 'out_refund']), ('state', 'not in', ['draft', 'cancel'])]</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="invoice_tree_show_total_untaxed" model="ir.ui.view">
  24. <field name="name">account.invoice.tree.show.total.untaxed</field>
  25. <field name="model">account.invoice</field>
  26. <field name="inherit_id" ref="account.invoice_tree"/>
  27. <field name="arch" type="xml">
  28. <field name="amount_total_signed" position="after">
  29. <field name="amount_untaxed_signed" sum="Total Untaxed"/>
  30. </field>
  31. </field>
  32. </record>
  33. <record id="account_analytic_account_button_invoice" model="ir.ui.view">
  34. <field name="name">account.analytic.account.button.invoice
  35. </field>
  36. <field name="model">account.analytic.account</field>
  37. <field name="inherit_id" ref="analytic.view_account_analytic_account_form" />
  38. <field name="arch" type="xml">
  39. <xpath expr='//div[@name="button_box"]' position='inside'>
  40. <button class="oe_stat_button" type="action" icon="fa-edit"
  41. name="%(contract_show_invoice.act_analytic_invoices)d"
  42. help="Invoices related with this contract">
  43. <div class="o_form_field o_stat_info">
  44. <span class="o_stat_value">
  45. <field name="total_invoiced" widget="monetary"
  46. options="{'currency_field': 'currency_id'}"/>
  47. </span>
  48. <span class="o_stat_text">Invoiced</span>
  49. </div>
  50. </button>
  51. </xpath>
  52. </field>
  53. </record>
  54. </odoo>