[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>
This commit is contained in:
@@ -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'])
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user