From de240e28183be881078af89893b504fc6478051a Mon Sep 17 00:00:00 2001 From: Peter Langenberg Date: Thu, 14 Feb 2013 13:58:41 +0100 Subject: [PATCH] [fix]l10n_be_coda/wizard/account_coda_import.py warning No transactions or no period in coda file ! to avoid key error lp bug: https://launchpad.net/bugs/1125165 fixed bzr revid: pl@agaplan.eu-20130214125841-ytdwspwug910v1hv --- addons/l10n_be_coda/wizard/account_coda_import.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/l10n_be_coda/wizard/account_coda_import.py b/addons/l10n_be_coda/wizard/account_coda_import.py index 78d3dbcc545..b952ee5d0f6 100644 --- a/addons/l10n_be_coda/wizard/account_coda_import.py +++ b/addons/l10n_be_coda/wizard/account_coda_import.py @@ -264,6 +264,8 @@ class account_coda_import(osv.osv_memory): raise osv.except_osv(_('Error'), _("Configuration Error in journal %s!\nPlease verify the Default Debit and Credit Account settings.") % statement['journal_id'].name) if balance_start_check != statement['balance_start']: statement['coda_note'] = _("The CODA Statement %s Starting Balance (%.2f) does not correspond with the previous Closing Balance (%.2f) in journal %s!") % (statement['description'] + ' #' + statement['paperSeqNumber'], statement['balance_start'], balance_start_check, statement['journal_id'].name) + if not(statement.get('period_id')): + raise osv.except_osv(_('Error') + ' R3006', _(' No transactions or no period in coda file !')) data = { 'name': statement['paperSeqNumber'], 'date': statement['date'],