oca-ocb-core/odoo-bringout-oca-ocb-mail_bot/mail_bot/controllers/thread.py
Ernad Husremovic 2d3ee4855a 19.0 vanilla
2026-03-09 09:30:27 +01:00

12 lines
546 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.http import request, route
from odoo.addons.mail.controllers import thread
class ThreadController(thread.ThreadController):
@route()
def mail_message_post(self, thread_model, thread_id, post_data, context=None, **kwargs):
if kwargs.get("canned_response_ids"):
request.update_context(canned_response_ids=kwargs["canned_response_ids"])
return super().mail_message_post(thread_model, thread_id, post_data, context, **kwargs)