PURCHASE: fix the UOM for purchase line and improve update price unit
[odoo/odoo.git] / addons / purchase / purchase_view.xml
index fd67c62..a28c829 100644 (file)
@@ -22,8 +22,7 @@
                                                <field name="date_order" select="1"/>
                                                <field name="partner_id" select="1" on_change="onchange_partner_id(partner_id)"/>
                                                <field name="partner_address_id"/>
-                                               <field name="pricelist_id" domain="[('type','=','sale')]"/>
-                                               <field name="project_id" select="1"/>
+                                               <field name="pricelist_id" domain="[('type','=','purchase')]"/>
                                                <field name="ref" select="1"/>
                                                <field name="partner_ref" select="1"/>
                                                <newline/>
                        <form string="Purchase Order Line">
                                <notebook>
                                        <page string="Order Line">
+                                               <field name="account_analytic_id"/>
+                                               <newline/>
                                                <field name="product_qty"/>
-                                               <field name="product_uom"/>
+                                               <field name="product_uom" on_change="product_uom_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id)"/>
                                                <field name="product_id" colspan="3" on_change="product_id_change(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id)" context="partner_id=parent.partner_id,quantity=product_qty,pricelist=parent.pricelist_id,uom=product_uom,warehouse=parent.warehouse_id"/>
                                                <field name="name" colspan="3"/>
                                                <field name="date_planned"/>