[IMP] Product visible discount: discount is expressed based in Public Price
bzr revid: fp@tinyerp.com-20131209142203-20l555dfdyvb60xe
This commit is contained in:
parent
5f0fcfb9be
commit
66e85ee1e0
|
@ -278,8 +278,6 @@ class product_pricelist(osv.osv):
|
|||
break
|
||||
|
||||
if price:
|
||||
# FP Note: what's this?
|
||||
# results['item_id'] = res.id
|
||||
if 'uom' in context and not uom_price_already_computed:
|
||||
product = products_dict[product.id]
|
||||
uom = product.uos_id or product.uom_id
|
||||
|
@ -292,7 +290,6 @@ class product_pricelist(osv.osv):
|
|||
product = self.pool.get('product.product').browse(cr, uid, prod_id, context=context)
|
||||
res_multi = self.price_get_multi(cr, uid, pricelist_ids=ids, products_by_qty_by_partner=[(product, qty, partner)], context=context)
|
||||
res = res_multi[prod_id]
|
||||
res.update({'item_id': {ids[-1]: res_multi.get('item_id', ids[-1])}})
|
||||
return res
|
||||
|
||||
|
||||
|
|
|
@ -48,12 +48,6 @@ class sale_order_line(osv.osv):
|
|||
product_obj = self.pool.get('product.product')
|
||||
field_name = 'list_price'
|
||||
|
||||
if res_dict.get('item_id',False) and res_dict['item_id'].get(pricelist,False):
|
||||
item = res_dict['item_id'].get(pricelist,False)
|
||||
item_base = item_obj.read(cr, uid, [item], ['base'])[0]['base']
|
||||
if item_base > 0:
|
||||
field_name = price_type_obj.browse(cr, uid, item_base).field
|
||||
|
||||
product = product_obj.browse(cr, uid, product_id, context)
|
||||
product_read = product_obj.read(cr, uid, product_id, [field_name], context=context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue