Browse Source

[FIX] Fixed sync domain problem with escape characters. Added context variable auto_created=True when creating contacts. So a possible send double opt in mail function can check for this context variable

pull/384/head
Wolfgang Pichler 5 years ago
parent
commit
5333997927
  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