account_invoice_view.xml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="account_invoice_customer_credit" model="ir.ui.view">
  5. <field name="name">account.invoice.credit</field>
  6. <field name="model">account.invoice</field>
  7. <field name="inherit_id" ref="account.invoice_form" />
  8. <field name="arch" type="xml">
  9. <field name="payment_term" position="replace"/>
  10. <field name="account_id" position="after">
  11. <label for="contado" string="Forma de pago"/>
  12. <div>
  13. <label for="contado" string="Contado"/>
  14. <field name="contado" attrs="{'readonly': [('state','!=','draft')]}"/>
  15. <label for="credito" string="Crédito"/>
  16. <field name="credito" attrs="{'readonly' : ['|',('state','!=','draft')]}"/>
  17. <field name="payment_term" options="{'no_create': True}" attrs="{'invisible' : [('credito', '=', False )]}"/>
  18. </div>
  19. </field>
  20. </field>
  21. </record>
  22. <record id="account_invoice_supplier_credit" model="ir.ui.view">
  23. <field name="name">account.invoice.supplier.credit</field>
  24. <field name="model">account.invoice</field>
  25. <field name="inherit_id" ref="account.invoice_supplier_form" />
  26. <field name="arch" type="xml">
  27. <field name="payment_term" position="replace"/>
  28. <field name="journal_id" position="after">
  29. <label for="contado" string="Forma de pago"/>
  30. <div>
  31. <label for="contado" string="Contado"/>
  32. <field name="contado" attrs="{'readonly': [('state','!=','draft')]}"/>
  33. <label for="credito" string="Crédito"/>
  34. <field name="credito" attrs="{'readonly' : ['|',('state','!=','draft')]}"/>
  35. <field name="payment_term" options="{'no_create': True}" attrs="{'invisible' : [('credito', '=', False )]}"/>
  36. </div>
  37. </field>
  38. </field>
  39. </record>
  40. </data>
  41. </openerp>