-
-
Notifications
You must be signed in to change notification settings - Fork 621
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] mail_partner_opt_out: add or remove from blacklist in mass.
This implementation allows users to add or remove users emails from the blacklist in mass.
- Loading branch information
1 parent
c76689c
commit 47c61fd
Showing
11 changed files
with
71 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,9 @@ Mail Partner Opt Out | |
|
||
This module adds the capability for a user to add a partner's email address | ||
to the blackmail list so that she will not receive any emails from mass | ||
mailing campaigns | ||
mailing campaigns. | ||
It also allows the users to add or remove emails from the blacklist in mass, | ||
by adding an action on the res.partner list view. | ||
|
||
**Table of contents** | ||
|
||
|
@@ -48,6 +50,11 @@ will be removed from the blacklist. | |
You can also filter for the Blacklist attribute, to see all the partner's that | ||
their email has been added to the blacklist. | ||
|
||
To add or remove emails to the blacklist in mass, go to the partners list view and select | ||
the records of partners that must be added or removed from the blacklist. Press action, | ||
and then "Add To Blacklist" or "Remove From Blacklist". For the remove case, a wizard will | ||
open where you can specify the reason of the removal. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
|
@@ -72,6 +79,7 @@ Contributors | |
* ForgeFlow, S.L. ([email protected]) | ||
|
||
* Jordi Ballester Alomar ([email protected]) | ||
* Marina Alapont ([email protected]) | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from . import models | ||
from . import wizard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
* ForgeFlow, S.L. ([email protected]) | ||
|
||
* Jordi Ballester Alomar ([email protected]) | ||
* Marina Alapont ([email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
This module adds the capability for a user to add a partner's email address | ||
to the blackmail list so that she will not receive any emails from mass | ||
mailing campaigns | ||
mailing campaigns. | ||
It also allows the users to add or remove emails from the blacklist in mass, | ||
by adding an action on the res.partner list view. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import mail_blacklist_remove |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from odoo import models | ||
|
||
|
||
class MailBlacklistRemove(models.TransientModel): | ||
_inherit = "mail.blacklist.remove" | ||
|
||
def action_unblacklist_apply(self): | ||
email_list = [email.strip() for email in self.email.split(",")] | ||
for email in email_list: | ||
self.env["mail.blacklist"].action_remove_with_reason(email, self.reason) | ||
return {"type": "ir.actions.act_window_close"} | ||