summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwan <wan@odoo.com>2019-09-16 09:04:13 +0000
committerwan <wan@odoo.com>2019-09-30 11:25:59 +0000
commitf60acb4f49132a2103db8e868e830b4e5e11b8fb (patch)
treeb1fb050adb9e6f2d34d82b25c939e47c0d224f02
parent971c376c5c4e7d79544b8cc6e883b50354e8758c (diff)
[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) <qdp@openerp.com>
-rw-r--r--addons/account_bank_statement_import/account_bank_statement_import.py3
-rw-r--r--addons/account_bank_statement_import/account_bank_statement_import_view.xml1
2 files changed, 1 insertions, 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 @@
</ul>
<field name="attachment_ids" widget="many2many_binary" colspan="2" string="Select Files" nolabel="1"/>
- <field name="filename" invisible="1"/>
<footer>
<button name="import_file" string="Upload" type="object" class="btn-primary" />
<button string="Cancel" class="btn-secondary" special="cancel"/>