From aa294e52555d246bf0eb1b47c3d9c95ba7efe3cb Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 2 Feb 2018 10:29:11 +0100 Subject: [PATCH] [FIX+IMP] mass_mailing_list_dynamic: tests, icons, filters... (#211) * [FIX+IMP] mass_mailing_list_dynamic: tests, icons, filters... * Brand new icon * Added feature of loading an existing filter as criteria * Tests as SavepointCase for optimizing times * Tests in post-install for avoiding errors on res.partner not null constraints when several modules added them. * Updated documentation. * Fix mock in test for not commiting test data. * [FIX] mass_mailing_list_dynamic: Wasn't able to create contacts in fully synced lists Syncing context was being set in the wrong object. Added to test too. * [FIX] mass_mailing_list_dynamic: Allow to write back vals from res.partner Module mass_mailing_partner writes back certain values from partner to mass_mailing_contact. Module should allow that write operation. --- mass_mailing_partner/models/res_partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mass_mailing_partner/models/res_partner.py b/mass_mailing_partner/models/res_partner.py index 118dd03c..334d6a03 100644 --- a/mass_mailing_partner/models/res_partner.py +++ b/mass_mailing_partner/models/res_partner.py @@ -55,7 +55,7 @@ class ResPartner(models.Model): if vals.get('name'): mm_vals['name'] = vals['name'] if vals.get('email'): - mm_vals['name'] = vals['email'] + mm_vals['email'] = vals['email'] # Using sudo because ACLs shouldn't produce data inconsistency self.env["mail.mass_mailing.contact"].sudo().search([ ("partner_id", "in", self.ids),