mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
Fix warning
Port tests to v12 and python3
This commit is contained in:
@@ -9,7 +9,9 @@ class AccountBankStatement(models.Model):
|
||||
|
||||
import_file = fields.Many2one(
|
||||
'ir.attachment', 'Import file', readonly=True)
|
||||
import_date = fields.Datetime(related='import_file.create_date')
|
||||
import_user = fields.Many2one(related='import_file.create_uid')
|
||||
import_date = fields.Datetime(
|
||||
related='import_file.create_date', string='Imported on')
|
||||
import_user = fields.Many2one(
|
||||
related='import_file.create_uid', string='Imported by')
|
||||
import_log = fields.Text(
|
||||
related='import_file.description', string='Import Warnings')
|
||||
|
||||
@@ -24,11 +24,12 @@ class AccountBankStatementImport(models.TransientModel):
|
||||
@api.model
|
||||
def _prepare_import_file_attachment(self, data_file, statement_id,
|
||||
notifications, filename):
|
||||
if not filename:
|
||||
filename = '<unknown>'
|
||||
return {
|
||||
'name': filename,
|
||||
'res_model': 'account.bank.statement',
|
||||
'res_id': statement_id,
|
||||
'type': 'binary',
|
||||
'datas': data_file,
|
||||
'datas_fname': filename,
|
||||
'description': '\n'.join(
|
||||
|
||||
Reference in New Issue
Block a user