[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 <smetl@users.noreply.github.com>
This commit is contained in:
Swapnesh Shah
2020-08-26 16:27:31 +00:00
committed by GitHub
parent 4debe9f1fa
commit 9f609565a2
+2 -2
View File
@@ -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]