[FIX] sale_stock, warning: fixed inheritancy of product_id_change in order to be...
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 23 Oct 2013 08:57:58 +0000 (10:57 +0200)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Wed, 23 Oct 2013 08:57:58 +0000 (10:57 +0200)
bzr revid: qdp-launchpad@openerp.com-20131023085758-1kz7r8kepmuhthr3

addons/sale_stock/sale_stock.py
addons/sale_stock/sale_stock_view.xml
addons/warning/warning.py

index 3ea0621..648c3c3 100644 (file)
@@ -328,7 +328,7 @@ class sale_order_line(osv.osv):
         return {'value': result, 'warning': warning}
 
 
-    def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
+    def product_id_change_with_wh(self, cr, uid, ids, pricelist, product, qty=0,
             uom=False, qty_uos=0, uos=False, name='', partner_id=False,
             lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False, warehouse_id=False, context=None):
         context = context or {}
index 01b978a..92826be 100644 (file)
                        <field name="product_id"
                        context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
                        groups="base.group_user" 
-                       on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, parent.warehouse_id, context)"/>
+                       on_change="product_id_change_with_wh(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, True, parent.date_order, product_packaging, parent.fiscal_position, False, parent.warehouse_id, context)"/>
                    </xpath>
                    <xpath expr="//field[@name='order_line']/tree//field[@name='product_uom_qty']" position="replace">
                        <field context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'uom':product_uom}"
                              name="product_uom_qty" 
-                       on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, product_packaging, parent.fiscal_position, True, parent.warehouse_id, context)"/>
+                       on_change="product_id_change_with_wh(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, product_packaging, parent.fiscal_position, True, parent.warehouse_id, context)"/>
                    </xpath>
                    <xpath expr="//field[@name='order_line']/form//field[@name='product_id']" position="replace">
                        <field name="product_id"
index fe3b93d..52754e5 100644 (file)
@@ -213,7 +213,7 @@ class product_product(osv.osv):
 
 class sale_order_line(osv.osv):
     _inherit = 'sale.order.line'
-    def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
+    def product_id_change_with_wh(self, cr, uid, ids, pricelist, product, qty=0,
             uom=False, qty_uos=0, uos=False, name='', partner_id=False,
             lang=False, update_tax=True, date_order=False, packaging=False,
             fiscal_position=False, flag=False, warehouse_id=False, context=None):
@@ -235,7 +235,7 @@ class sale_order_line(osv.osv):
             warning['title'] = title
             warning['message'] = message
 
-        result =  super(sale_order_line, self).product_id_change( cr, uid, ids, pricelist, product, qty,
+        result =  super(sale_order_line, self).product_id_change_with_wh( cr, uid, ids, pricelist, product, qty,
             uom, qty_uos, uos, name, partner_id,
             lang, update_tax, date_order, packaging, fiscal_position, flag, warehouse_id=warehouse_id, context=context)