[FIX] account:account_tax_chart form name corrected
authorDHS (OpenERP) <dhs@tinyerp.com>
Tue, 26 Oct 2010 10:27:26 +0000 (15:57 +0530)
committerDHS (OpenERP) <dhs@tinyerp.com>
Tue, 26 Oct 2010 10:27:26 +0000 (15:57 +0530)
lp bug: https://launchpad.net/bugs/666101 fixed

bzr revid: dhs@tinyerp.com-20101026102726-n2phrs3jxzgbu462

addons/account/wizard/account_tax_chart.py

index 1595a60..82925d1 100644 (file)
@@ -66,7 +66,8 @@ class account_tax_chart(osv.osv_memory):
             result['context'] = str({'state': data['target_move']})
 
         if data['period_id']:
-            result['name'] += ':' + self.pool.get('account.period').read(cr, uid, [data['period_id']], context=context)[0]['code']
+            period_code = period_obj.read(cr, uid, [data['period_id']], context=context)[0]['code']
+            result['name'] += period_code and (':' + period_code) or ''
         return result
 
     _defaults = {