[REV] revert of a partially wrong commit introduced in a previous merge with trunk and detected during the code review
bzr revid: qdp-launchpad@openerp.com-20140505123709-2v2efr7ghzgxgo76
This commit is contained in:
parent
78a7ae966f
commit
693a60058e
|
@ -614,15 +614,10 @@ class product_product(osv.osv):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _product_lst_price(self, cr, uid, ids, name, arg, context=None):
|
def _product_lst_price(self, cr, uid, ids, name, arg, context=None):
|
||||||
res = dict.fromkeys(ids, 0.0)
|
res = {}
|
||||||
product_uom_obj = self.pool.get('product.uom')
|
product_uom_obj = self.pool.get('product.uom')
|
||||||
|
for id in ids:
|
||||||
# retrieve pricelist
|
res.setdefault(id, 0.0)
|
||||||
pricelist = None
|
|
||||||
if context.get('pricelist'):
|
|
||||||
pricelist = self.pool['product.pricelist'].browse(cr, uid, context.get('pricelist'), context=context)
|
|
||||||
base_currency = self.pool['res.users'].browse(cr, uid, uid, context=context).company_id.currency_id
|
|
||||||
|
|
||||||
for product in self.browse(cr, uid, ids, context=context):
|
for product in self.browse(cr, uid, ids, context=context):
|
||||||
if 'uom' in context:
|
if 'uom' in context:
|
||||||
uom = product.uos_id or product.uom_id
|
uom = product.uos_id or product.uom_id
|
||||||
|
@ -631,10 +626,6 @@ class product_product(osv.osv):
|
||||||
else:
|
else:
|
||||||
res[product.id] = product.list_price
|
res[product.id] = product.list_price
|
||||||
res[product.id] = (res[product.id] or 0.0) * (product.price_margin or 1.0) + product.price_extra
|
res[product.id] = (res[product.id] or 0.0) * (product.price_margin or 1.0) + product.price_extra
|
||||||
# update the result, according to the eventual pricelist currency
|
|
||||||
if pricelist and pricelist.currency_id:
|
|
||||||
res[product.id] = self.pool['res.currency'].compute(
|
|
||||||
cr, uid, base_currency.id, pricelist.currency_id.id, res[product.id], round=False, context=context)
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _save_product_lst_price(self, cr, uid, product_id, field_name, field_value, arg, context=None):
|
def _save_product_lst_price(self, cr, uid, product_id, field_name, field_value, arg, context=None):
|
||||||
|
|
Loading…
Reference in New Issue