[REF] [crm_]mail_client_extension: rename to mail_plugin

Rename the mail_client_extension and crm_mail_client_extension modules to
mail_plugin and crm_mail_plugin respectively, purpose is to shorten the name of
the modules as it is now quite big and verbose.

Task-2427737

UPG-PR: https://github.com/odoo/upgrade/pull/2156
COM-PR: https://github.com/odoo/odoo/pull/66139
This commit is contained in:
nounoubensebia
2021-03-29 14:21:05 +00:00
parent 5107028082
commit 3d514037bb
21 changed files with 17 additions and 17 deletions
@@ -22,7 +22,7 @@ class ResConfigSettings(models.TransientModel):
string='Allow the users to synchronize their calendar with Google Calendar')
module_microsoft_calendar = fields.Boolean(
string='Allow the users to synchronize their calendar with Outlook Calendar')
module_mail_client_extension = fields.Boolean(
module_mail_plugin = fields.Boolean(
string='Allow integration with the mail plugins'
)
module_google_drive = fields.Boolean("Attach Google documents to any record")
@@ -210,12 +210,12 @@
<h2>Integrations</h2>
<div class="row mt16 o_settings_container" name="integration">
<div class="col-12 col-lg-6 o_setting_box" id="mail_client_extension_setting">
<div class="col-12 col-lg-6 o_setting_box" id="mail_pluggin_setting">
<div class="o_setting_left_pane">
<field name="module_mail_client_extension" />
<field name="module_mail_plugin" />
</div>
<div class="o_setting_right_pane">
<label string="Mail Client Extension" for="module_mail_client_extension"/>
<label string="Mail Plugin" for="module_mail_plugin"/>
<a href="https://www.odoo.com/documentation/user/crm/optimize/outlook_extension.html" title="Documentation" class="o_doc_link" target="_blank"></a>
<div class="text-muted">
Integrate with mail client plugins
@@ -2,7 +2,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'CRM Mail Client Extension',
'name': 'CRM Mail Plugin',
'version': '1.0',
'category': 'Sales/CRM',
'sequence': 5,
@@ -11,10 +11,10 @@
'website': 'https://www.odoo.com/page/crm',
'depends': [
'crm',
'mail_client_extension',
'mail_plugin',
],
'data': [
'views/crm_mail_client_extension_lead.xml',
'views/crm_mail_plugin_lead.xml',
'views/crm_lead_views.xml'
],
'installable': True,
@@ -35,7 +35,7 @@ class CrmClient(http.Controller):
deprecated as of saas-14.3, not needed for newer versions of the mail plugin but necessary
for supporting older versions
"""
server_action = http.request.env.ref("crm_mail_client_extension.lead_creation_prefilled_action")
server_action = http.request.env.ref("crm_mail_plugin.lead_creation_prefilled_action")
return werkzeug.utils.redirect(
'/web#action=%s&model=crm.lead&partner_id=%s' % (server_action.id, int(partner_id)))
@@ -6,7 +6,7 @@ import logging
from odoo.http import request
from odoo.tools.misc import formatLang
from odoo.addons.mail_client_extension.controllers import mail_plugin
from odoo.addons.mail_plugin.controllers import mail_plugin
_logger = logging.getLogger(__name__)
@@ -2,7 +2,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Mail Client Extension',
'name': 'Mail Plugin',
'version': '1.0',
'category': 'Sales/CRM',
'sequence': 5,
@@ -14,7 +14,7 @@
'iap'
],
'data': [
'views/mail_client_extension_login.xml',
'views/mail_plugin_login.xml',
],
'installable': True,
'application': False,
@@ -26,7 +26,7 @@ class Authenticate(http.Controller):
old route name "/mail_client_extension/auth is deprecated as of saas-14.3,it is not needed for newer
versions of the mail plugin but necessary for supporting older versions
"""
return request.render('mail_client_extension.app_auth', values)
return request.render('mail_plugin.app_auth', values)
@http.route(['/mail_client_extension/auth/confirm', '/mail_plugin/auth/confirm'], type='http', auth="user", methods=['POST'])
def auth_confirm(self, scope, friendlyname, redirect, info=None, do=None, **kw):
@@ -75,7 +75,7 @@ class Authenticate(http.Controller):
data, auth_code_signature = auth_code.split('.')
data = base64.b64decode(data)
auth_code_signature = base64.b64decode(auth_code_signature)
signature = odoo.tools.misc.hmac(request.env(su=True), 'mail_client_extension', data).encode()
signature = odoo.tools.misc.hmac(request.env(su=True), 'mail_plugin', data).encode()
if not hmac.compare_digest(auth_code_signature, signature):
return None
@@ -98,7 +98,7 @@ class Authenticate(http.Controller):
'uid': request.uid,
}
auth_message = json.dumps(auth_dict, sort_keys=True).encode()
signature = odoo.tools.misc.hmac(request.env(su=True), 'mail_client_extension', auth_message).encode()
signature = odoo.tools.misc.hmac(request.env(su=True), 'mail_plugin', auth_message).encode()
auth_code = "%s.%s" % (base64.b64encode(auth_message).decode(), base64.b64encode(signature).decode())
_logger.info('Auth code created - user %s, scope %s', request.env.user, scope)
return auth_code
@@ -23,4 +23,4 @@ class IrHttp(models.AbstractModel):
raise BadRequest('Access token invalid')
# take the identity of the API key user
request.uid = user_id
request.uid = user_id
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="mail_client_extension.app_auth" name="Accept app">
<template id="mail_plugin.app_auth" name="Accept app">
<t t-call="web.login_layout">
<t t-set="disable_database_manager" t-value="1"/>
<form class="oe_login_form" role="form" method="post" action="/mail_client_extension/auth/confirm">
<form class="oe_login_form" role="form" method="post" action="/mail_plugin/auth/confirm">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<input type="hidden" name="redirect" t-att-value="redirect"/>
<input type="hidden" name="scope" t-att-value="scope"/>