diff --git a/account_statement_import_file/i18n/account_statement_import_file.pot b/account_statement_import_file/i18n/account_statement_import_file.pot index 9ec893f7..f1eb4dea 100644 --- a/account_statement_import_file/i18n/account_statement_import_file.pot +++ b/account_statement_import_file/i18n/account_statement_import_file.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" +"Project-Id-Version: Odoo Server 17.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -42,7 +42,7 @@ msgstr "" #: code:addons/account_statement_import_file/wizard/account_statement_import.py:0 #, python-format msgid "" -"Could not find any bank account with number '%(account_number)s' linked to " +"Could not find any bank account with number '%(account_number)s' linked to " "partner '%(partner_name)s'. You should create the bank account and set it on" " the related bank journal. If the related bank journal doesn't exist yet, " "you should create a new one." @@ -110,11 +110,6 @@ msgstr "" msgid "Journal" msgstr "" -#. module: account_statement_import_file -#: model:ir.model.fields,field_description:account_statement_import_file.field_account_statement_import____last_update -msgid "Last Modified on" -msgstr "" - #. module: account_statement_import_file #: model:ir.model.fields,field_description:account_statement_import_file.field_account_statement_import__write_uid msgid "Last Updated by" @@ -168,7 +163,7 @@ msgstr "" msgid "" "The bank account with number '%(account_number)s' exists in Odoo but it is " "not set on any bank journal. You should set it on the related bank journal. " -"If the related bank journal doesn't exist yet, you should create a new one." +"If the related bank journal doesn't exist yet, you should create a new one." msgstr "" #. module: account_statement_import_file diff --git a/account_statement_import_file/wizard/account_statement_import.py b/account_statement_import_file/wizard/account_statement_import.py index fc2b3c4d..56ca28a0 100644 --- a/account_statement_import_file/wizard/account_statement_import.py +++ b/account_statement_import_file/wizard/account_statement_import.py @@ -39,7 +39,12 @@ class AccountStatementImport(models.TransientModel): "only contains already imported transactions." ) ) - self.env["ir.attachment"].create(self._prepare_create_attachment(result)) + attachment = self.env["ir.attachment"].create( + self._prepare_create_attachment(result) + ) + for statement_id in result["statement_ids"]: + statement = self.env["account.bank.statement"].browse(statement_id) + statement.write({"attachment_ids": [(4, attachment.id)]}) return result def import_file_button(self):