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"
|
||||||
@@ -42,7 +42,7 @@ msgstr ""
|
|||||||
#: code:addons/account_statement_import_file/wizard/account_statement_import.py:0
|
#: code:addons/account_statement_import_file/wizard/account_statement_import.py:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
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"
|
"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, "
|
" the related bank journal. If the related bank journal doesn't exist yet, "
|
||||||
"you should create a new one."
|
"you should create a new one."
|
||||||
@@ -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"
|
||||||
@@ -168,7 +163,7 @@ msgstr ""
|
|||||||
msgid ""
|
msgid ""
|
||||||
"The bank account with number '%(account_number)s' exists in Odoo but it is "
|
"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. "
|
"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 ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: account_statement_import_file
|
#. module: account_statement_import_file
|
||||||
|
|||||||
@@ -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