mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[17.0][ADD] account_statement_import_file: add file to statement's field attachment_ids
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Odoo Server 16.0\n"
|
"Project-Id-Version: Odoo Server 17.0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@@ -110,11 +110,6 @@ msgstr ""
|
|||||||
msgid "Journal"
|
msgid "Journal"
|
||||||
msgstr ""
|
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
|
#. module: account_statement_import_file
|
||||||
#: model:ir.model.fields,field_description:account_statement_import_file.field_account_statement_import__write_uid
|
#: model:ir.model.fields,field_description:account_statement_import_file.field_account_statement_import__write_uid
|
||||||
msgid "Last Updated by"
|
msgid "Last Updated by"
|
||||||
|
|||||||
@@ -39,7 +39,12 @@ class AccountStatementImport(models.TransientModel):
|
|||||||
"only contains already imported transactions."
|
"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
|
return result
|
||||||
|
|
||||||
def import_file_button(self):
|
def import_file_button(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user