From e561df32ba5fe89f94a218306c59a7272b3ecf54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Mon, 22 Sep 2014 17:15:38 +0200 Subject: [PATCH] [IMP] support MT940 without footer record at end of file Luxemburg multiline MT940 bank statements contain one statement and have no footer record. https://www.multiline.lu/fileadmin/media/downloads/MT940_V2_fr.pdf This commit adapts the base parser to handle that situation. --- account_banking_mt940/mt940.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/account_banking_mt940/mt940.py b/account_banking_mt940/mt940.py index d425e3028..010c4b07e 100644 --- a/account_banking_mt940/mt940.py +++ b/account_banking_mt940/mt940.py @@ -101,6 +101,12 @@ class MT940(object): record_line = line except StopIteration: pass + if self.current_statement: + if record_line: + self.handle_record(cr, record_line) + record_line = '' + self.statements.append(self.current_statement) + self.current_statement = None return self.statements def append_continuation_line(self, cr, line, continuation_line):