Commit Graph
6 Commits
Author SHA1 Message Date
std-odoo df218ad58a [FIX] mail_plugin: do not allow to create a partner from notification email
Purpose
=======
When an email is opened and is from the default notification mechanism,
i.e: coming from something like "notifications@mail.odoo.com", we don't
want to try to match the email address to an existing contact partner.

Instead, we now display a custom message on the mail addon side
mentioning to search the contact manually.

Task-3557545

closes odoo/odoo#148073

X-original-commit: 9ff0815e258160f0eca595e0c3cce4b005e79eea
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-01-05 09:12:50 +00:00
Yannick Tivisse 285541e9dd [FIX] mail: Make tests demo data independent
Part-of: odoo/odoo#146649
2023-12-18 23:32:05 +00:00
std-odoo 3ec29a8e42 [FIX] mail_plugin: fix access error when enriching some partners
Bug
===
When we enrich a partner we don't have access to, it will try to read
it, but because of the ACL if will crash. To fix that issue, we don't
return the partner if we can't access it and we show an error message
in the UI instead of letting it crash.

Task-3344536

closes odoo/odoo#135025

X-original-commit: a3dcae1eebe7920ae788d5ff6d12c45e19a9628d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-09-11 15:22:15 +00:00
std-odoo 6e7960314b [FIX] mail_plugin: do not enrich blacklisted domains
Bug
===
Currently, we try to enrich the domains even if they are in the
`_MAIL_DOMAIN_BLACKLIST`. IAP always return a "missing data" error
because it can't enrich "gmail.com", etc except for "odoo.com". In that
case the enrichment is successful, but because the domain is
blacklisted, we use the entire email to find the company (and so it
will create a company for each odoo.com email addresses).

The test that was removed was wrong. It works because we mocked the
enrichment response, but in practice it will always return a missing
data error.

Task-3050230

closes odoo/odoo#107235

X-original-commit: 37503108cd878412474b5486877a861dad2efc1d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-06 09:25:56 +01:00
Raphael Collet 6cf8db906f [REF] *: adapt code to new flush API
closes odoo/odoo#87527

Related: odoo/upgrade#3497
Related: odoo/enterprise#26939
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-05-25 18:00:47 +02:00
std-odoo ab179fb600 [FIX] mail_plugin: avoid repeating company creation
Purpose
=======
Avoid creating / enriching multiple time the same company.

It can occur in many situation; when IAP do not return an email address
the the company, when the domain is blacklisted...

We also want to remove the field "iap_enrich_info" from the res.partner
model because this field can be heavy (JSON field) and the res.partner
model is used a lot.

Technical
=========
For this purpose, we create a new model <res.partner.iap> which will
store the IAP response and the requested domain.

So we can retrieve the previously enriched company regardless of the
partner's values

Task 2466653
See odoo/odoo/pull/68286
See odoo/upgrade/pull/2301

closes odoo/odoo#68286

Related: odoo/upgrade#2301
Related: odoo/enterprise#17426
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-01 14:23:07 +00:00