[MERGE]: Merge with lp:~openerp-commiter/openobject-addons/trunk-addons-aag
bzr revid: rpa@tinyerp.com-20110209071857-g5xkcqwrkix6ut4u
This commit is contained in:
@@ -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 >= 0.0:
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user