|
@@ -0,0 +1,32 @@
|
|
|
|
+<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
+<openerp>
|
|
|
|
+ <data>
|
|
|
|
+ <record id="account_invoice_cred_check" model="ir.ui.view">
|
|
|
|
+ <field name="name">account.invoice.cred.check</field>
|
|
|
|
+ <field name="model">account.invoice</field>
|
|
|
|
+ <field name="inherit_id" ref="account.invoice_form" />
|
|
|
|
+ <field name="arch" type="xml">
|
|
|
|
+ <field name="fiscal_position" position="after">
|
|
|
|
+ <button name="habilitar_check" states="draft" string="Habilitar Credito" class="oe_button oe_form_button oe_highlight"
|
|
|
|
+ type="object" help="Habilitar Credito" groups="account.group_account_user"/>
|
|
|
|
+ <field name="enable_credit" string='Habilitar Crédito' groups="account.group_account_user" readonly="1" nolabel='1' states="draft"/>
|
|
|
|
+ </field>
|
|
|
|
+ </field>
|
|
|
|
+ </record>
|
|
|
|
+
|
|
|
|
+ <record id="account_invoice_cred_enable" model="ir.ui.view">
|
|
|
|
+ <field name="name">account.invoice.cred.enable</field>
|
|
|
|
+ <field name="model">account.invoice</field>
|
|
|
|
+ <field name="inherit_id" ref="factura_venta_golden.account_invoice_cred_cont" />
|
|
|
|
+ <field name="arch" type="xml">
|
|
|
|
+ <field name="contado" position="replace">
|
|
|
|
+ <field name="contado" attrs="{'readonly': [('state','!=','draft')]}"/>
|
|
|
|
+ </field>
|
|
|
|
+ <field name="credito" position="replace" >
|
|
|
|
+ <field name="credito" attrs="{'readonly' : ['|',('state','!=','draft'), ('enable_credit', '=', False )]}"/>
|
|
|
|
+ </field>
|
|
|
|
+ </field>
|
|
|
|
+ </record>
|
|
|
|
+
|
|
|
|
+ </data>
|
|
|
|
+</openerp>
|