Browse Source

Merge 5333997927 into f303cae18d

pull/384/merge
Wolfgang Pichler 5 years ago
committed by GitHub
parent
commit
5c6c9005b8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      mass_mailing_list_dynamic/models/mail_mass_mailing_list.py

4
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,
})

Loading…
Cancel
Save