Commit Graph
6 Commits
Author SHA1 Message Date
std-odoo f3f750b0f7 [FIX] mail: do not ignore email sent by mailing list
Bug
===
Since 9c1cdd330e we ignore all incoming
email sent by mailing lists.

They are real use case when people want to be able to receive email
from mailing list (e.g. if they subscribed to an automated service,
or if someone is in leave and has done a auto-replier for that, etc).

Add a model to whitelist some email address. The alias limit
does not apply for those emails.

Task-2862092

closes odoo/odoo#92015

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-07 10:16:18 +02: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 9c1cdd330e [IMP] mail: avoid email loops when Odoo reply automatically
Purpose
=======
In this commit, we will fix the loops that occur when you send an email
to an alias (to create a ticket e.g.). In that case Odoo can reply
"Your ticket has been created" and then the auto-replier of the user
can reply to this email and the loop occurs.

Specifications
==============
To solve this issues, we add 2 system parameters
- <mail.gateway.loop.minutes>, 120 minutes by default
- <mail.gateway.loop.threshold>, 20 by default

When an email is sent to an alias, we look on the last records created
<mail.gateway.loop.minutes> minutes ago. If we overcome the limit
<mail.gateway.loop.threshold> the email is ignored.

Alias creation detection
========================
To detect the number of records created by a specific email address we
use the `_primary_email` attribute set on the model.

Task-2294034

closes odoo/odoo#78597

Related: odoo/enterprise#21772
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-20 13:14:56 +02:00
David Tran 15b93edc8e [I18N] mail: add missing func _ for messages
closes odoo/odoo#86521

X-original-commit: a08f4e00715dba4a0447dce879b46da0e581669e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 16:07:38 +01:00
Martin Trigaux ba244cef01 [IMP] *: replace to new _() syntax
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))

Old syntax is still compatible but starts the migration to the new
syntax that catches error.
2020-06-18 13:03:34 +02:00
Thibault Delavallée f849468511 [MOV] mail: move blacklist mixin in its own file and rename thread_cc file
Purpose is to have all thread mixin available at a glance.

closes odoo/odoo#51098

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-12 12:00:01 +00:00