[FIX]account_asset:Fixes the expresion problem in
authorjacara <>
Fri, 2 Nov 2012 07:25:00 +0000 (12:55 +0530)
committerKhushboo Bhatt (Open ERP) <kbh@tinyerp.com>
Fri, 2 Nov 2012 07:25:00 +0000 (12:55 +0530)
lp bug: https://launchpad.net/bugs/1074228 fixed

bzr revid: kbh@tinyerp.com-20121102072500-ylzaw1i75a13kimh

addons/account_asset/account_asset.py

index 585798a..aed2528 100644 (file)
@@ -376,7 +376,7 @@ class account_asset_depreciation_line(osv.osv):
             current_currency = line.asset_id.currency_id.id
             context.update({'date': depreciation_date})
             amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.amount, context=context)
-            sign = line.asset_id.category_id.journal_id.type = 'purchase' and 1 or -1
+            sign == (line.asset_id.category_id.journal_id.type == 'purchase' and 1) or -1
             asset_name = line.asset_id.name
             reference = line.name
             move_vals = {