diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 377eae58acc..158a5a0404e 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -821,6 +821,9 @@ class AccountBankStatementLine(models.Model): } st_line.process_reconciliation(new_aml_dicts=[vals]) + def _get_communication(self, payment_method_id): + return self.name or '' + def process_reconciliation(self, counterpart_aml_dicts=None, payment_aml_rec=None, new_aml_dicts=None): """ Match statement lines with existing payments (eg. checks) and/or payables/receivables (eg. invoices and refunds) and/or new move lines (eg. write-offs). If any new journal item needs to be created (via new_aml_dicts or counterpart_aml_dicts), a new journal entry will be created and will contain those @@ -918,7 +921,7 @@ class AccountBankStatementLine(models.Model): 'state': 'reconciled', 'currency_id': currency.id, 'amount': abs(total), - 'communication': self.name or '', + 'communication': self._get_communication(payment_methods[0] if payment_methods else False), 'name': self.statement_id.name, }) diff --git a/addons/mrp/views/mrp_production_views.xml b/addons/mrp/views/mrp_production_views.xml index 240307f27d6..f64bc301229 100644 --- a/addons/mrp/views/mrp_production_views.xml +++ b/addons/mrp/views/mrp_production_views.xml @@ -89,7 +89,7 @@