From 623cdeef013ad3923db1151b3152b29a0daec74b Mon Sep 17 00:00:00 2001 From: pedrambiria Date: Mon, 2 Jan 2023 14:35:04 +0000 Subject: [PATCH] [FIX] crm_mail_plugin: get CRM lead with partner id Before this commit: Outlook Plugin wasn't able to get the opportunities of contact. The problem was that the `crm_lead_get_by_partner_id` function calls `_fetch_partner_leads` from the `CrmClient` instance, while it doesn't have this function. The solution is inherit the `MailPluginController` which contains this function. opw-3092995 closes odoo/odoo#109452 X-original-commit: 7013772d3b760cba0ba2fc1e4162ccfc260eba43 Signed-off-by: Thibault Delavallee (tde) Signed-off-by: Pedram Bi Ria (pebr) --- addons/crm_mail_plugin/controllers/crm_client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/crm_mail_plugin/controllers/crm_client.py b/addons/crm_mail_plugin/controllers/crm_client.py index efd47f98645..1bebba3a1ad 100644 --- a/addons/crm_mail_plugin/controllers/crm_client.py +++ b/addons/crm_mail_plugin/controllers/crm_client.py @@ -5,8 +5,10 @@ from odoo import http from odoo.http import request from odoo.tools import html2plaintext +from .mail_plugin import MailPluginController -class CrmClient(http.Controller): + +class CrmClient(MailPluginController): @http.route(route='/mail_client_extension/log_single_mail_content', type="json", auth="outlook", cors="*")