[IMP] sale_margin: Code reverted

bzr revid: pso@tinyerp.com-20101221094204-8kdgkgmtr7d886zd
This commit is contained in:
pso 2010-12-21 15:12:04 +05:30
parent 69c31f245b
commit 96c353e309
1 changed files with 1 additions and 2 deletions

View File

@ -30,9 +30,8 @@ class sale_order_line(osv.osv):
uom=uom, qty_uos=qty_uos, uos=uos, name=name, partner_id=partner_id,
lang=lang, update_tax=update_tax, date_order=date_order, packaging=packaging, fiscal_position=fiscal_position, flag=flag)
if product:
rate = self.pool.get('res.partner').browse(cr, uid, partner_id).property_product_pricelist.currency_id.rate
purchase_price = self.pool.get('product.product').browse(cr, uid, product).standard_price
res['value'].update({'purchase_price': purchase_price * rate})
res['value'].update({'purchase_price': purchase_price})
return res
def _product_margin(self, cr, uid, ids, field_name, arg, context=None):