Wolfgang Pichler
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
mass_mailing_list_dynamic/models/mail_mass_mailing_list.py
|
|
@ -3,7 +3,7 @@ |
|
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). |
|
|
|
|
|
|
|
from odoo import api, fields, models |
|
|
|
from odoo.tools import safe_eval |
|
|
|
from odoo.tools.safe_eval import safe_eval |
|
|
|
|
|
|
|
|
|
|
|
class MassMailingList(models.Model): |
|
|
@ -55,7 +55,7 @@ class MassMailingList(models.Model): |
|
|
|
current_partners = current_contacts.mapped("partner_id") |
|
|
|
# Add new contacts |
|
|
|
for partner in desired_partners - current_partners: |
|
|
|
Contact.create({ |
|
|
|
Contact.with_context(auto_created=True).create({ |
|
|
|
"list_id": one.id, |
|
|
|
"partner_id": partner.id, |
|
|
|
}) |
|
|
|