Browse Source

[FIX] have one list of notifications

[IMP] use a nice formatting to show notifications for imported file
pull/47/head
Holger Brunn 9 years ago
parent
commit
e8d5da1a81
  1. 2
      account_bank_statement_import/models/account_bank_statement_import.py
  2. 4
      account_bank_statement_import_save_file/models/account_bank_statement_import.py

2
account_bank_statement_import/models/account_bank_statement_import.py

@ -94,7 +94,7 @@ class AccountBankStatementImport(models.TransientModel):
self._import_statement(stmt_vals))
if statement_id:
statement_ids.append(statement_id)
notifications.append(new_notifications)
notifications.extend(new_notifications)
if len(statement_ids) == 0:
raise Warning(_('You have already imported that file.'))
return statement_ids, notifications

4
account_bank_statement_import_save_file/models/account_bank_statement_import.py

@ -46,5 +46,7 @@ class AccountBankStatementImport(models.TransientModel):
'res_id': statement_id,
'type': 'binary',
'datas': base64.b64encode(data_file),
'description': notifications,
'description': '\n'.join(
'%(type)s: %(message)' % notification
for notification in notifications) or False,
}
Loading…
Cancel
Save