[MERGE][FIX] product: context propagating in res_currency.compute(). Courtesy of Yannick Vaucher @ Camptocamp. Thanks dude

bzr revid: qdp-launchpad@openerp.com-20130418141013-vukxknub32p7djqd
This commit is contained in:
Quentin (OpenERP) 2013-04-18 16:10:13 +02:00
commit 27c3b6cc33
1 changed files with 4 additions and 1 deletions

View File

@ -236,7 +236,10 @@ class product_pricelist(osv.osv):
qty, context=context)[res['base_pricelist_id']]
ptype_src = self.browse(cr, uid, res['base_pricelist_id']).currency_id.id
uom_price_already_computed = True
price = currency_obj.compute(cr, uid, ptype_src, res['currency_id'], price_tmp, round=False)
price = currency_obj.compute(cr, uid,
ptype_src, res['currency_id'],
price_tmp, round=False,
context=context)
elif res['base'] == -2:
# this section could be improved by moving the queries outside the loop:
where = []