comprobante.xml 3.5 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-primary' string="+ Producto por precio final" type="object" attrs="{'invisible':[('comp_estado','!=','b')]}"/>
                    </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='imprimir']" position="before">
                        <button name="abrir_wizard_ppf" class='btn btn-primary' string="+ Producto por precio final" type="object" attrs="{'invisible':[('comp_estado','!=','b')]}"/>
                    </xpath>

                    <xpath expr="//group[1]" position="after">
                        <group string="Referencia" col="2">
                            <field name="referencia_corr" colspan="1" nolabel="1" widget="many2many_tags" />
                        </group>
                    </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">
                        <!--<field name="qr" />-->
                        <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>