[FIX] mail_plugin: fix traceback when the partner has been removed
Bug === 1. Open an email in Outlook, and create the contact 2. Go to Odoo and remove the partner 3. Without refreshing the browser tab, click on the "reload" icon of the addin. A traceback will be raised on the Odoo side Task-2601837 X-original-commit: bb2e5ce9cf149a5cfd68cf908184c823f882d97d Part-of: odoo/odoo#89848
This commit is contained in:
@@ -144,7 +144,7 @@ class MailPluginController(http.Controller):
|
||||
return {'error': _('You need to specify at least the partner_id or the name and the email')}
|
||||
|
||||
if partner_id:
|
||||
partner = request.env['res.partner'].browse(partner_id)
|
||||
partner = request.env['res.partner'].browse(partner_id).exists()
|
||||
return self._get_contact_data(partner)
|
||||
|
||||
normalized_email = tools.email_normalize(email)
|
||||
|
||||
Reference in New Issue
Block a user