[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
This commit is contained in:
Peter Langenberg 2013-02-14 13:58:41 +01:00
parent 2ace4972e6
commit de240e2818
1 changed files with 2 additions and 0 deletions

View File

@ -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'],