<menuitem
id="menu_purchase_config_pricelist" name="Pricelists"
parent="menu_purchase_config_purchase" sequence="50" groups="product.group_purchase_pricelist"/>
+ <menuitem
+ action="product.product_pricelist_action_for_purchase" id="menu_product_pricelist_action2_purchase"
+ parent="menu_purchase_config_pricelist" sequence="1" groups="product.group_purchase_pricelist" />
<menuitem
action="product.product_pricelist_action_for_purchase" id="menu_product_pricelist_action2_purchase"
</group>
<group>
<field name="date_order"/>
- <field name="origin" attr="{'invisible': [('origin','=',False)]}"/>
+ <field name="origin" attrs="{'invisible': [('origin','=',False)]}"/>
<field name="warehouse_id" on_change="onchange_warehouse_id(warehouse_id)" widget="selection" groups="stock.group_locations"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<page string="Purchase Order">
<field name="order_line">
<tree string="Purchase Order Lines" editable="bottom">
- <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
+ <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,False,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<field name="name"/>
<field name="date_planned"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<sheet>
<group>
<group>
- <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
+ <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,False,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/>
<label for="product_qty"/>
<div>
<field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)" class="oe_inline"/>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<div name="options" position="inside">
- <field name="purchase_ok"/>
+ <field name="purchase_ok" attrs="{'readonly': [('is_only_child', '=', False)]}"/>
<label for="purchase_ok"/>
</div>
<group name="procurement" position="after">
<xpath expr="//div[@name='buttons']" position="inside">
<button string="Purchases" name="%(action_purchase_line_product_tree)d" type="action" groups="purchase.group_purchase_user"/>
</xpath>
- <xpath expr="//field[@name='property_account_expense']" position="replace" >
+ <field name="property_account_expense" position="replace" >
<field name="property_account_expense" domain="[('type','<>','view'),('type','<>','consolidation')]" attrs="{'readonly':[('purchase_ok','=',0)]}" groups="account.group_account_user"/>
- </xpath>
- <xpath expr="//field[@name='supplier_taxes_id']" position="replace" >
+ </field>
+ <field name='supplier_taxes_id' position="replace" >
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags" attrs="{'readonly':[('purchase_ok','=',0)]}"/>
- </xpath>
+ </field>
</field>
</record>
</data>