[IMP] point_of_sale:small change price name

bzr revid: sbh@tinyerp.com-20100524080224-4n3s0twr0j5ur07l
This commit is contained in:
sbh (Open ERP)
2010-05-24 13:32:24 +05:30
parent 196972157a
commit bb793483f0
+3 -3
View File
@@ -1091,13 +1091,13 @@ class pos_order_line(osv.osv):
uom_id=p_obj.uom_po_id.id
price = self.pool.get('product.pricelist').price_get(cr, uid,
[pricelist], product_id, qty or 1.0, partner_id,{'uom': uom_id})[pricelist]
price=price or p_obj.list_price
if price is False:
unit_price=price or p_obj.list_price
if unit_price is False:
raise osv.except_osv(_('No valid pricelist line found !'),
_("Couldn't find a pricelist line matching this product" \
" and quantity.\nYou have to change either the product," \
" the quantity or the pricelist."))
return price
return unit_price
def onchange_product_id(self, cr, uid, ids, pricelist, product_id, qty=0, partner_id=False):
price = self.price_by_product(cr, uid, ids, pricelist, product_id, qty, partner_id)