From 6e6a7d9ec5808fb8a5bb45ccf7dd8c276fa88c3f Mon Sep 17 00:00:00 2001 From: Matthieu Dietrich Date: Mon, 4 Jul 2016 11:30:29 +0200 Subject: [PATCH] Only set account_id if not set by parser --- account_move_base_import/models/account_journal.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/account_move_base_import/models/account_journal.py b/account_move_base_import/models/account_journal.py index 89cabc5b..231c27ba 100644 --- a/account_move_base_import/models/account_journal.py +++ b/account_move_base_import/models/account_journal.py @@ -29,8 +29,8 @@ class AccountJournal(models.Model): string='Type of import', default='generic_csvxls_so', required=True, - help="Choose here the method by which you want to import bank " - "statement for this profile.") + help="Choose here the method by which you want to import account " + "moves for this journal.") last_import_date = fields.Datetime( string="Last Import Date") @@ -59,7 +59,7 @@ class AccountJournal(models.Model): launch_import_completion = fields.Boolean( string="Launch completion after import", help="Tic that box to automatically launch the completion " - "on each imported file using this profile.") + "on each imported file using this journal.") def _get_rules(self): # We need to respect the sequence order @@ -190,7 +190,8 @@ class AccountJournal(models.Model): values['company_currency_id'] = self.company_id.currency_id.id values['journal_id'] = self.id values['move_id'] = move.id - values['account_id'] = self.receivable_account_id.id + if not values.get('account_id', False): + values['account_id'] = self.receivable_account_id.id values = move_line_obj._add_missing_default_values(values) return values