Skip to content
Extraits de code Groupes Projets
Valider f7c978cd rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

Support for IBAN

parent 9a3088a8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -18,22 +18,12 @@ class AccountBankStatementImport(models.TransientModel):
str.encode(open(file_to_import, 'r').read()))
# Check raw data
super(AccountBankStatementImport, self)._check_parsed_data(stmts_vals)
# Try to find the currency and journal in odoo
currency, journal = super(
AccountBankStatementImport,
self)._find_additional_data(currency_code, account_number)
# If no journal found, ask the user about creating one
# Try to find the journal in odoo based on account number
journal = self.env['account.journal'].search(
[('bank_acc_number', '=like', account_number)], limit=1)
if not journal:
# The active_id is passed in context so the wizard can call
# import_file again once the journal is created
return super(
AccountBankStatementImport, self)._journal_creation_wizard(
currency, account_number)
if (not journal.default_debit_account_id
or not journal.default_credit_account_id):
raise UserError(_('You have to set a Default Debit Account and a \
Default Credit Account for the journal: %s') % (journal.name,))
raise UserError(
_("No journal found matching '%s'.") % account_number)
# Prepare statement data to be used for bank statements creation
stmts_vals = super(
AccountBankStatementImport,
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter