From f60acb4f49132a2103db8e868e830b4e5e11b8fb Mon Sep 17 00:00:00 2001 From: wan Date: Mon, 16 Sep 2019 09:04:13 +0000 Subject: [PATCH] [FIX] account_bank_statement_import: unused variable There was a useless variable left at the refactoring of https://github.com/odoo/odoo/commit/97c3f0f0257774af0e064b0085e2b6c5b65d9efe closes odoo/odoo#37020 Signed-off-by: Quentin De Paoli (qdp) --- .../account_bank_statement_import.py | 3 +-- .../account_bank_statement_import_view.xml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/account_bank_statement_import/account_bank_statement_import.py b/addons/account_bank_statement_import/account_bank_statement_import.py index 35e1b02ab76..2257590765b 100644 --- a/addons/account_bank_statement_import/account_bank_statement_import.py +++ b/addons/account_bank_statement_import/account_bank_statement_import.py @@ -26,7 +26,6 @@ class AccountBankStatementImport(models.TransientModel): _description = 'Import Bank Statement' attachment_ids = fields.Many2many('ir.attachment', string='Files', required=True, help='Get you bank statements in electronic format from your bank and select them here.') - filename = fields.Char() def import_file(self): """ Process the file chosen in the wizard, create bank statement(s) and go to reconciliation. """ @@ -177,7 +176,7 @@ class AccountBankStatementImport(models.TransientModel): for st_vals in stmts_vals: st_vals['journal_id'] = journal.id if not st_vals.get('reference'): - st_vals['reference'] = self.filename + st_vals['reference'] = " ".join(self.attachment_ids.mapped('name')) if st_vals.get('number'): #build the full name like BNK/2016/00135 by just giving the number '135' st_vals['name'] = journal.sequence_id.with_context(ir_sequence_date=st_vals.get('date')).get_next_char(st_vals['number']) diff --git a/addons/account_bank_statement_import/account_bank_statement_import_view.xml b/addons/account_bank_statement_import/account_bank_statement_import_view.xml index 8fc215b7032..486a02f960c 100644 --- a/addons/account_bank_statement_import/account_bank_statement_import_view.xml +++ b/addons/account_bank_statement_import/account_bank_statement_import_view.xml @@ -12,7 +12,6 @@ -