[ADD]Structured communications
authordle@openerp.com <>
Thu, 6 Dec 2012 11:27:02 +0000 (12:27 +0100)
committerdle@openerp.com <>
Thu, 6 Dec 2012 11:27:02 +0000 (12:27 +0100)
bzr revid: dle@openerp.com-20121206112702-ii47dx25r7amegrq

addons/l10n_be_coda/wizard/account_coda_import.py

index eac8f83..fdabf9e 100644 (file)
@@ -126,7 +126,11 @@ class account_coda_import(osv.osv_memory):
                     statementLine['transaction_family'] = rmspaces(line[54:56])
                     statementLine['transaction_code'] = rmspaces(line[56:58])
                     statementLine['transaction_category'] = rmspaces(line[58:61])
-                    statementLine['communication'] = rmspaces(line[62:115])
+                    if line[61] == '1':
+                        #Structured communication
+                        statementLine['communication'] = '+++' + line[65:68] + '/' + line[68:72] + '/' + line[72:77] + '+++'
+                    else:
+                        statementLine['communication'] = rmspaces(line[62:115])
                     statementLine['entryDate'] = rmspaces(line[115:121])
                     statementLine['type'] = 'normal'
                     statementLine['globalisation'] = int(line[124])