[IMP] report_intrastat: 'intrastat' report now uses decimal.precision
authorolt@tinyerp.com <>
Mon, 4 Oct 2010 11:30:10 +0000 (13:30 +0200)
committerolt@tinyerp.com <>
Mon, 4 Oct 2010 11:30:10 +0000 (13:30 +0200)
bzr revid: olt@tinyerp.com-20101004113010-dj6i5kvfce5jnt1z

addons/report_intrastat/report_intrastat.py

index 90c2884..a77c4f5 100644 (file)
@@ -21,6 +21,7 @@
 
 from osv import osv, fields
 from tools.sql import drop_view_if_exists
+from decimal_precision import decimal_precision as dp
 
 
 class res_country(osv.osv):
@@ -69,7 +70,7 @@ class report_intrastat(osv.osv):
         'code': fields.char('Country code', size=2, readonly=True),
         'intrastat_id': fields.many2one('report.intrastat.code', 'Intrastat code', readonly=True),
         'weight': fields.float('Weight', readonly=True),
-        'value': fields.float('Value', readonly=True),
+        'value': fields.float('Value', readonly=True, digits_compute=dp.get_precision('Account')),
         'type': fields.selection([('import', 'Import'), ('export', 'Export')], 'Type'),
         'currency_id': fields.many2one('res.currency', "Currency", readonly=True),
     }