[FIX] stock_landed_costs : Fixed the calculation of former cost per unit.

bzr revid: mdi@tinyerp.com-20140421094748-eg9l1yfjwr57ekz6
This commit is contained in:
DJ Patel 2014-04-21 15:17:48 +05:30
parent 567103bb92
commit 4751a49a9f
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ class stock_valuation_adjustment_lines(osv.osv):
'former_cost_per_unit': 0.0,
'final_cost': 0.0,
}
result[line.id]['former_cost_per_unit'] = (line.former_cost / line.quantity or 1.0)
result[line.id]['former_cost_per_unit'] = (line.former_cost / line.quantity if line.quantity else 1.0)
result[line.id]['final_cost'] = (line.former_cost + line.additional_landed_cost)
return result