account_invoice_view.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!-- Invoices -->
  5. <record id="invoice_form" model="ir.ui.view">
  6. <field name="name">account.invoice.form</field>
  7. <field name="model">account.invoice</field>
  8. <field name="inherit_id" ref="account.invoice_form"/>
  9. <field name="arch" type="xml">
  10. <form>
  11. <field name="internal_number" invisible="1"/>
  12. </form>
  13. <button name="invoice_cancel" position="after">
  14. <button name="clean_internal_number" string="Clean Internal Number" attrs="{'invisible':['|',('state','!=','cancel'),('internal_number','=',False)]}" type="object" help="Cleaning the invoice internal number will allow you to delete this invoice or to get a new number if you re-validate it. If this invoice represents a voided invoice, then you should not clean it." groups="account.group_account_manager"/>
  15. </button>
  16. </field>
  17. </record>
  18. <record id="invoice_supplier_form" model="ir.ui.view">
  19. <field name="name">account.invoice.form</field>
  20. <field name="model">account.invoice</field>
  21. <field name="inherit_id" ref="account.invoice_supplier_form"/>
  22. <field name="arch" type="xml">
  23. <form>
  24. <field name="internal_number" invisible="1"/>
  25. </form>
  26. <button name="invoice_cancel" position="after">
  27. <button name="clean_internal_number" string="Clean Internal Number" attrs="{'invisible':['|',('state','!=','cancel'),('internal_number','=',False)]}" type="object" help="Cleaning the invoice internal number will allow you to delete this invoice or to get a new number if you re-validate it. If this invoice represents a voided invoice, then you should not clean it." groups="account.group_account_manager"/>
  28. </button>
  29. </field>
  30. </record>
  31. </data>
  32. </openerp>