123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?xml version="1.0" encoding="UTF-8"?>
- <openerp>
- <data>
- <record id="invoice_pricelist_form" model="ir.ui.view">
- <field name="name">account.invoice.pricelist.form</field>
- <field name="model">account.invoice</field>
- <field name="inherit_id" ref="account.invoice_form"/>
- <field name="arch" type="xml">
- <xpath expr="//field[@name='fiscal_position']" position="after">
- <field name="pricelist_id" domain="[('type','=','sale'),('active','=',True)]" groups="product.group_sale_pricelist" attrs="{'readonly':[('state','!=','draft')]}" string="Lista de precios"/>
- </xpath>
- <xpath expr="//field[@name='invoice_line']/tree/field[@name='product_id']" position="attributes">
- <attribute name="context">{'type': type, 'pricelist_id': parent.pricelist_id}</attribute>
- </xpath>
- <xpath expr="//field[@name='invoice_line']/tree/field[@name='quantity']" position="attributes">
- <attribute name="context">{'type': type, 'pricelist_id': parent.pricelist_id}</attribute>
- <attribute name="on_change">product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, parent.company_id, context)</attribute>
- </xpath>
- </field>
- </record>
- <record id="invoice_pricelist_supplier_form" model="ir.ui.view">
- <field name="name">account.invoice.pricelist.form</field>
- <field name="model">account.invoice</field>
- <field name="inherit_id" ref="account.invoice_supplier_form"/>
- <field name="arch" type="xml">
- <xpath expr="//field[@name='fiscal_position']" position="after">
- <field name="pricelist_id" domain="[('type','=','purchase'),('active','=',True)]" groups="product.group_purchase_pricelist" attrs="{'readonly':[('state','!=','draft')]}" string="Lista de precios"/>
- </xpath>
- <xpath expr="//field[@name='invoice_line']/tree/field[@name='product_id']" position="attributes">
- <attribute name="context">{'type': type, 'pricelist_id': parent.pricelist_id}</attribute>
- </xpath>
- <xpath expr="//field[@name='invoice_line']/tree/field[@name='quantity']" position="attributes">
- <attribute name="context">{'type': type, 'pricelist_id': parent.pricelist_id}</attribute>
- <attribute name="on_change">product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, parent.company_id, context)</attribute>
- </xpath>
- </field>
- </record>
- </data>
- </openerp>
|