[FIX] Pricelist : Proper context passed to price_get to make use of pricelist version...
authorJay (OpenERP) <jvo@tinyerp.com>
Tue, 4 Jan 2011 11:36:28 +0000 (17:06 +0530)
committerJay (OpenERP) <jvo@tinyerp.com>
Tue, 4 Jan 2011 11:36:28 +0000 (17:06 +0530)
lp bug: https://launchpad.net/bugs/637243 fixed

bzr revid: jvo@tinyerp.com-20110104113628-rb7zuiyzp3pfykeu

addons/product/pricelist.py

index 22c2607..6573237 100644 (file)
@@ -130,7 +130,8 @@ class product_pricelist(osv.osv):
             'date': Date of the pricelist (%Y-%m-%d),
         }
         '''
-        context = context or {}
+        if context is None:
+            context = {}
         currency_obj = self.pool.get('res.currency')
         product_obj = self.pool.get('product.product')
         supplierinfo_obj = self.pool.get('product.supplierinfo')
@@ -202,7 +203,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,