diff --git a/account_payment_order/models/account_move.py b/account_payment_order/models/account_move.py
index ab9d3213b..2d629cf34 100644
--- a/account_payment_order/models/account_move.py
+++ b/account_payment_order/models/account_move.py
@@ -103,17 +103,20 @@ class AccountMove(models.Model):
move.message_post(
body=_(
"%d payment lines added to the new draft payment "
- "order %s which has been automatically created."
+ "order %s which has been automatically created."
)
- % (count, payorder.name)
+ % (count, payorder.id, payorder.display_name)
)
else:
move.message_post(
body=_(
"%d payment lines added to the existing draft "
- "payment order %s."
+ "payment order "
+ "%s."
)
- % (count, payorder.name)
+ % (count, payorder.id, payorder.display_name)
)
action = self.env["ir.actions.act_window"]._for_xml_id(
"account_payment_order.account_payment_order_%s_action"