[FIX] Product : context transmitted as an argument to the call of price_get()
lp bug: https://launchpad.net/bugs/709275 fixed bzr revid: jvo@tinyerp.com-20110215105546-ae4m6ard0twluyra
This commit is contained in:
parent
7cccb71fa1
commit
3174bc4af5
|
@ -262,7 +262,7 @@ class product_pricelist(osv.osv):
|
|||
price = currency_obj.compute(cr, uid,
|
||||
price_type.currency_id.id, res['currency_id'],
|
||||
product_obj.price_get(cr, uid, [product_id],
|
||||
price_type.field)[product_id], round=False, context=context)
|
||||
price_type.field,context=context)[product_id], round=False, context=context)
|
||||
|
||||
if price:
|
||||
price_limit = price
|
||||
|
@ -385,7 +385,7 @@ class product_pricelist(osv.osv):
|
|||
else:
|
||||
price_tmp = self.price_get(cr, uid,
|
||||
[res['base_pricelist_id']], prod_id,
|
||||
qty)[res['base_pricelist_id']]
|
||||
qty,context=context)[res['base_pricelist_id']]
|
||||
ptype_src = self.browse(cr, uid,
|
||||
res['base_pricelist_id']).currency_id.id
|
||||
price = currency_obj.compute(cr, uid, ptype_src,
|
||||
|
@ -413,7 +413,7 @@ class product_pricelist(osv.osv):
|
|||
price = currency_obj.compute(cr, uid,
|
||||
price_type.currency_id.id, res['currency_id'],
|
||||
product_obj.price_get(cr, uid, [prod_id],
|
||||
price_type.field)[prod_id], round=False, context=context)
|
||||
price_type.field,context=context)[prod_id], round=False, context=context)
|
||||
|
||||
if price:
|
||||
price_limit = price
|
||||
|
|
|
@ -766,12 +766,12 @@ class product_supplierinfo(osv.osv):
|
|||
currency_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
|
||||
for supplier in partner_pool.browse(cr, uid, supplier_ids, context=context):
|
||||
# Compute price from standard price of product
|
||||
price = product_pool.price_get(cr, uid, [product_id], 'standard_price')[product_id]
|
||||
price = product_pool.price_get(cr, uid, [product_id], 'standard_price', context=context)[product_id]
|
||||
|
||||
# Compute price from Purchase pricelist of supplier
|
||||
pricelist_id = supplier.property_product_pricelist_purchase.id
|
||||
if pricelist_id:
|
||||
price = pricelist_pool.price_get(cr, uid, [pricelist_id], product_id, product_qty).setdefault(pricelist_id, 0)
|
||||
price = pricelist_pool.price_get(cr, uid, [pricelist_id], product_id, product_qty, context=context).setdefault(pricelist_id, 0)
|
||||
price = currency_pool.compute(cr, uid, pricelist_pool.browse(cr, uid, pricelist_id).currency_id.id, currency_id, price)
|
||||
|
||||
# Compute price from supplier pricelist which are in Supplier Information
|
||||
|
|
|
@ -90,7 +90,7 @@ class report_custom(report_rml):
|
|||
pro.append('<pro name="%s" >' % (x['name']))
|
||||
temp = []
|
||||
for q in qty:
|
||||
price_dict = pool.get('product.pricelist').price_get(cr, uid, [price_list_id], x['id'], q)
|
||||
price_dict = pool.get('product.pricelist').price_get(cr, uid, [price_list_id], x['id'], q, context=context)
|
||||
if price_dict[price_list_id]:
|
||||
price = price_dict[price_list_id]
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue