account_move_view.xml 1.6 KB

1234567891011121314151617181920212223242526272829
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_move_form_debit" model="ir.ui.view">
  4. <field name="name">account.move.form.debit</field>
  5. <field name="model">account.move</field>
  6. <field name="inherit_id" ref="account.view_move_form"/>
  7. <field name="arch" type="xml">
  8. <button name="action_reverse" position="after">
  9. <field name="debit_origin_id" invisible="1"/>
  10. <button name="%(action_view_account_move_debit)d" string='Add Debit Note'
  11. type='action' groups="account.group_account_invoice"
  12. attrs="{'invisible': ['|', '|', ('debit_origin_id', '!=', False),
  13. ('move_type', 'not in', ('out_invoice', 'in_invoice', 'out_refund', 'in_refund')), ('state', '!=', 'posted')]}"/>
  14. </button>
  15. <div class="oe_button_box" position="inside">
  16. <button type="object" class="oe_stat_button" name="action_view_debit_notes" icon="fa-plus" attrs="{'invisible': [('debit_note_count', '=', 0)]}">
  17. <div class="o_field_widget o_stat_info">
  18. <span class="o_stat_value"><field name="debit_note_count"/></span>
  19. <span class="o_stat_text">Debit Notes</span>
  20. </div>
  21. </button>
  22. </div>
  23. <field name="invoice_origin" position="after">
  24. <field name="debit_origin_id" attrs="{'invisible': [('debit_origin_id', '=', False)]}"/>
  25. </field>
  26. </field>
  27. </record>
  28. </odoo>