[REF]sale:refectoring code wrong price calculation when changing UoM and pricelist based on other pricelist
bzr revid: ron@tinyerp.com-20110404100141-2i3og2pxcxf3n1sg
This commit is contained in:
+1
-3
@@ -1111,8 +1111,6 @@ class sale_order_line(osv.osv):
|
||||
result['product_uos_qty'] = qty
|
||||
result['th_weight'] = q * product_obj.weight # Round the quantity up
|
||||
|
||||
if not uom:
|
||||
uom =product_obj.uom_id and product_obj.uom_id.id
|
||||
if not uom2:
|
||||
uom2 = product_obj.uom_id
|
||||
if (product_obj.type=='product') and (product_obj.virtual_available * uom2.factor < qty * product_obj.uom_id.factor) \
|
||||
@@ -1135,7 +1133,7 @@ class sale_order_line(osv.osv):
|
||||
else:
|
||||
price = self.pool.get('product.pricelist').price_get(cr, uid, [pricelist],
|
||||
product, qty or 1.0, partner_id, {
|
||||
'uom': uom,
|
||||
'uom': uom or result.get('product_uom'),
|
||||
'date': date_order,
|
||||
})[pricelist]
|
||||
if price is False:
|
||||
|
||||
Reference in New Issue
Block a user