Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
A
automatic_bank_statement_import
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Le Filament
automatic_bank_statement_import
Validations
f7c978cd
Valider
f7c978cd
rédigé
Il y a 6 ans
par
Rémi - Le Filament
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
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
Modifications
1
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
wizard/account_bank_statement_import.py
+5
-15
5 ajouts, 15 suppressions
wizard/account_bank_statement_import.py
avec
5 ajouts
et
15 suppressions
wizard/account_bank_statement_import.py
+
5
−
15
Voir le fichier @
f7c978cd
...
...
@@ -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
,
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter