From 781934262f42e2d82cbe97fb0f52e3c834524618 Mon Sep 17 00:00:00 2001 From: Xavier ALT Date: Mon, 24 Apr 2023 09:13:21 +0000 Subject: [PATCH] [FIX] sale_management: confirmation email should be visible in chatter With the refactoring of the mail API, use the new `message_post_with_source()` to ensure the message content is visible in the chatter To reproduce: - Create a quotation template with a confirmation email - Create and confirm a sale order using that quotation template => We expect that confirmation email (content) to be visible in the chatter, currently the email (mail.mail) is ok but the message (mail.message) has no body which make it not/partially visible in the chatter. closes odoo/odoo#119566 X-original-commit: 6b3d74cde697ea655d5101d9ea426dc814ce2fa1 Signed-off-by: Victor Feyens (vfe) Signed-off-by: Xavier Alt (xal) --- addons/sale_management/models/sale_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_management/models/sale_order.py b/addons/sale_management/models/sale_order.py index 6df0e2fb5c3..e7cd5dbcf49 100644 --- a/addons/sale_management/models/sale_order.py +++ b/addons/sale_management/models/sale_order.py @@ -119,7 +119,7 @@ class SaleOrder(models.Model): for order in self: if order.sale_order_template_id and order.sale_order_template_id.mail_template_id: - order.sale_order_template_id.mail_template_id.send_mail(order.id) + order.message_post_with_source(order.sale_order_template_id.mail_template_id) return res def _recompute_prices(self):