[FIX] account_asset: Fixed tooltip, computation of digits using decimal precision.
authorUjjvala Collins (OpenERP) <uco@tinyerp.com>
Fri, 27 May 2011 05:21:42 +0000 (10:51 +0530)
committerUjjvala Collins (OpenERP) <uco@tinyerp.com>
Fri, 27 May 2011 05:21:42 +0000 (10:51 +0530)
bzr revid: uco@tinyerp.com-20110527052142-3s7lu0sefw4hzebc

addons/account_asset/account_asset.py

index 037b9f6..fa05c11 100644 (file)
@@ -22,6 +22,7 @@
 from osv import osv, fields
 import time
 from datetime import datetime
+import decimal_precision as dp
 
 class account_asset_category(osv.osv):
     _name = 'account.asset.category'
@@ -172,7 +173,7 @@ class account_asset_asset(osv.osv):
         'prorata':fields.boolean('Prorata Temporis', Readonly="True", help='Indicates that the accounting entries for this asset have to be done from the purchase date instead of the first January'),
         'history_ids': fields.one2many('account.asset.history', 'asset_id', 'History', readonly=True),
         'depreciation_line_ids': fields.one2many('account.asset.depreciation.line', 'asset_id', 'Depreciation Lines', readonly=True,),
-        'salvage_value': fields.float('Salvage Value', digits=(16,2), required=True, help="It is the amount you plan to have that you can't depreciate."),
+        'salvage_value': fields.float('Salvage Value', digits_compute=dp.get_precision('Account'), help="It is the remaining value of an asset after it has been fully depreciated."),
     }
     _defaults = {
         'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'account.asset.code'),