comprobante.xml 4.49 KB
<odoo>
    <data>
        <record id="view_form_inherit_comprobante_recibido_ui" model="ir.ui.view">
            <field name="name">Comprobante</field>
            <field name="model">asw.comprobante</field>
            <field name="inherit_id" ref="asw_tpv.view_form_comprobante_recibido_ui"/>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//button[@name='validar']" position="before">
                        <button name="abrir_wizard_ppf" class='btn btn-success' string="+ Producto por precio final" type="object" attrs="{'invisible':[('comp_estado','!=','b')]}"/>
                        <button name="recalcularTotal" class='btn btn-warning' string="Recalcular Monto" type="object" attrs="{'invisible':[('comp_estado','!=','b')]}"/>
                        <button name="generarNota" class='btn btn-info' string="Generar Nota" type="object" attrs="{'invisible':[('comp_estado','in',['b','a'])]}"/>                   
                    </xpath>
                    <xpath expr="//group[1]" position="after">
                        <group string="Referencias" col="2">
                            <!--<field name="referencia_corr" widget="many2many_tags" />-->
                            <field name="referencia_compras_corr" widget="many2many_tags" />
                        </group>
                    </xpath>
                </data>
            </field>
        </record>

        <record id="view_form_inherit_comprobante_ui" model="ir.ui.view">
            <field name="name">Comprobante</field>
            <field name="model">asw.comprobante</field>
            <field name="inherit_id" ref="asw_tpv.view_form_comprobante_ui"/>
            <field name="arch" type="xml">
                <data>
                    
                    <xpath expr="//button[@name='validar']" position="after">
                        <button name="abrir_wizard_ppf" class='btn btn-success' string="+ Producto por precio final" type="object" attrs="{'invisible':[('comp_estado','!=','b')]}"/>
                        <button name="recalcularTotal" class='btn btn-warning' string="Recalcular Monto" type="object" attrs="{'invisible':[('comp_estado','!=','b')]}"/>
                        <button name="impresion_directa" class='btn btn-info' string="Impresion directa" type="object" attrs="{'invisible':[('comp_estado','=','b')]}"/>
                        <button name="abrir_wizard_cn" type="object" class="btn btn-info" string="Corregir núm. AFIP"/>>
                        <button name="generarNota" class='btn btn-info' string="Generar Nota" type="object" attrs="{'invisible':[('comp_estado','in',['b','a'])]}"/>                   

                    </xpath>
                </data>
            </field>
        </record>

        <record id="view_form_inherit_comprobante_afip_ui" model="ir.ui.view">
            <field name="name">Comprobante</field>
            <field name="model">asw.comprobante</field>
            <field name="inherit_id" ref="asw_afipws_fe.view_invoice_afipws_fe_form"/>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//field[@name='afip_xml_response']" position="after">
                        <button name="CorrejirFacturaSinCAE" class="btn btn-warning" string="Correjir cae" type="object" colspam="2" />
                        <field name="referencia_orig_fact" />
                        <field name="referencia_orig_ptv" />
                        <field name="referencia_orig_numero" />
                        <field name="referencia_orig_letra" />
                        <field name="afip_qr" />
                        <field name="afip_qr_img" widget="image"/>
                    </xpath>
                </data>
            </field>
        </record>

        <record id="view_inherit_search_comprobante" model="ir.ui.view">
            <field name="name">Comprobante</field>
            <field name="model">asw.comprobante</field>
            <field name="inherit_id" ref="asw_tpv.view_search_comprobante"/>
            <field name="arch" type="xml">
                <data>
                    <xpath expr="//field[@name='comp_fecha']" position="after">
                        <field name="referencia_corr"/>    
                    </xpath>

                    <xpath expr="//group/filter[11]" position="after">
                        <filter string="Referencia Compra" domain="[]" context="{'group_by': 'referencia_corr'}"/>
                    </xpath>
                </data>
            </field>
        </record>

    </data>
</odoo>