From 32421c4daa749c48ff0f74f93f7df8fed1a08784 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 27 Mar 2018 17:14:14 +0200 Subject: [PATCH] [FIX] account: Name of an account.payment Steps to reproduce the bug: - Create a bank statement with a blank name - Reconcile any line statement with an invoice - Review the payment that was made for this statement Bug: The payment had no name. opw:182754 --- addons/account/i18n/account.pot | 6 ++++++ addons/account/models/account_bank_statement.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 2cc903886d2..e899b46b5af 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -1970,6 +1970,12 @@ msgstr "" msgid "Bank Statement" msgstr "" +#. module: account +#: code:addons/account/models/account_bank_statement.py:935 +#, python-format +msgid "Bank Statement %s" +msgstr "" + #. module: account #: model:ir.model,name:account.model_account_bank_statement_line msgid "Bank Statement Line" diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 43745287c33..5942dfb98f9 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -932,7 +932,7 @@ class AccountBankStatementLine(models.Model): 'currency_id': currency.id, 'amount': abs(total), 'communication': self._get_communication(payment_methods[0] if payment_methods else False), - 'name': self.statement_id.name, + 'name': self.statement_id.name or _("Bank Statement %s") % self.date, }) # Complete dicts to create both counterpart move lines and write-offs