account_invoice_view.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="account_invoice_cred_check" model="ir.ui.view">
  5. <field name="name">account.invoice.cred.check</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="fiscal_position" position="after">
  10. <button name="habilitar_check" states="draft" string="Habilitar Credito" class="oe_button oe_form_button oe_highlight"
  11. type="object" help="Habilitar Credito" groups="account.group_account_user"/>
  12. <field name="enable_credit" string='Habilitar Crédito' groups="account.group_account_user" readonly="1" nolabel='1' states="draft"/>
  13. </field>
  14. </field>
  15. </record>
  16. <record id="account_invoice_cred_enable" model="ir.ui.view">
  17. <field name="name">account.invoice.cred.enable</field>
  18. <field name="model">account.invoice</field>
  19. <field name="inherit_id" ref="factura_venta_golden.account_invoice_cred_cont" />
  20. <field name="arch" type="xml">
  21. <field name="contado" position="replace">
  22. <field name="contado" attrs="{'readonly': [('state','!=','draft')]}"/>
  23. </field>
  24. <field name="credito" position="replace" >
  25. <field name="credito" attrs="{'readonly' : ['|',('state','!=','draft'), ('enable_credit', '=', False )]}"/>
  26. </field>
  27. </field>
  28. </record>
  29. </data>
  30. </openerp>