[REV] mail: revert "[FIX] mail: remove suggested recipient"

Revert this fix, as it was not working as expected, and even prevent to create a partner.

Revert of following PR: #103596

closes odoo/odoo#104695

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Alexandre Kühn
2022-11-02 12:37:10 +01:00
parent a7afc49e36
commit db34bbacda
2 changed files with 1 additions and 28 deletions
-14
View File
@@ -5690,20 +5690,6 @@ msgstr ""
msgid "Please complete customer's information"
msgstr ""
#. module: mail
#. openerp-web
#: code:addons/mail/static/src/components/composer_suggested_recipient/composer_suggested_recipient.js:0
#, python-format
msgid "Invalid Partner"
msgstr ""
#. module: mail
#. openerp-web
#: code:addons/mail/static/src/components/composer_suggested_recipient/composer_suggested_recipient.js:0
#, python-format
msgid "The information you have entered does not match the existing contact information for this record. The partner was not created."
msgstr ""
#. module: mail
#: model_terms:ir.ui.view,arch_db:mail.mail_bounce_catchall
msgid "Please contact us instead using"
@@ -88,9 +88,8 @@ export class ComposerSuggestedRecipientView extends Component {
/**
* @private
* @param {object} record the newly-created record
*/
_onDialogSaved(record) {
_onDialogSaved() {
if (!this.composerSuggestedRecipientView.exists()) {
return;
}
@@ -102,18 +101,6 @@ export class ComposerSuggestedRecipientView extends Component {
return;
}
thread.fetchData(['suggestedRecipients']);
if (!this.suggestedRecipientInfo.partner) {
this.messaging.notify({
title: this.env._t('Invalid Partner'),
message: this.env._t('The information you have entered does not match the existing contact information for this record. The partner was not created.'),
type: 'warning'
});
this.messaging.rpc({
args: [[record.res_id]],
model: 'res.partner',
method: 'unlink',
});
}
}
}