From 9f609565a28aa9ed880c0926dacc9049cbfca566 Mon Sep 17 00:00:00 2001 From: Swapnesh Shah Date: Sun, 26 Apr 2020 09:02:04 +0000 Subject: [PATCH] [FIX] account: use correct creation message on refunds Before this commit, Creating a new Credit Note will log `Refund Created` into the chatter, and creating a new Vendor Refund will log `Credit Note Created` chatter due to wrong types given in `_get_creation_message` method. With this commit, We use the correct type in this method. closes odoo/odoo#56618 X-original-commit: 4d2d9f030d6a5a56657d30586ba6fc0bbd688fca Signed-off-by: Laurent Smet --- addons/account/models/account_move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 369667cc0a4..99f6195d4f6 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1801,9 +1801,9 @@ class AccountMove(models.Model): return super()._get_creation_message() return { 'out_invoice': _('Invoice Created'), - 'out_refund': _('Refund Created'), + 'out_refund': _('Credit Note Created'), 'in_invoice': _('Vendor Bill Created'), - 'in_refund': _('Credit Note Created'), + 'in_refund': _('Refund Created'), 'out_receipt': _('Sales Receipt Created'), 'in_receipt': _('Purchase Receipt Created'), }[self.move_type]