@ -3,7 +3,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api , fields , models
from odoo import api , fields , models
from odoo.tools import safe_eval
from odoo.tools.safe_eval import safe_eval
class MassMailingList ( models . Model ) :
class MassMailingList ( models . Model ) :
@ -55,7 +55,7 @@ class MassMailingList(models.Model):
current_partners = current_contacts . mapped ( " partner_id " )
current_partners = current_contacts . mapped ( " partner_id " )
# Add new contacts
# Add new contacts
for partner in desired_partners - current_partners :
for partner in desired_partners - current_partners :
Contact . create ( {
Contact . with_context ( auto_created = True ) . create ( {
" list_id " : one . id ,
" list_id " : one . id ,
" partner_id " : partner . id ,
" partner_id " : partner . id ,
} )
} )