[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) <vfe@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
This commit is contained in:
Xavier ALT
2023-04-25 09:38:05 +02:00
parent 22cc9660ed
commit 781934262f
+1 -1
View File
@@ -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):