[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
This commit is contained in:
Goffin Simon
2018-03-27 17:14:14 +02:00
parent fc659d3f78
commit 32421c4daa
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -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"
@@ -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