[FIX] mass_mailing: Select records with Leads / Opps as recipients

`False` is not syntax valid for a domain.
It leads to errors when trying to evaluate `False`
as a domain in the evaluation of `pyeval.js`.

Therefore, using `False` as default value for `mailing_domain`
isn't correct

opw-648857
This commit is contained in:
Denis Ledoux 2015-09-08 15:31:10 +02:00
parent 05f176f418
commit ca2fa82aba
1 changed files with 2 additions and 1 deletions

View File

@ -461,6 +461,7 @@ class MassMailing(osv.Model):
'reply_to': lambda self, cr, uid, ctx=None: self.pool['mail.message']._get_default_from(cr, uid, context=ctx), 'reply_to': lambda self, cr, uid, ctx=None: self.pool['mail.message']._get_default_from(cr, uid, context=ctx),
'mailing_model': 'mail.mass_mailing.contact', 'mailing_model': 'mail.mass_mailing.contact',
'contact_ab_pc': 100, 'contact_ab_pc': 100,
'mailing_domain': [],
} }
#------------------------------------------------------ #------------------------------------------------------
@ -517,7 +518,7 @@ class MassMailing(osv.Model):
else: else:
value['mailing_domain'] = "[('list_id', '=', False)]" value['mailing_domain'] = "[('list_id', '=', False)]"
else: else:
value['mailing_domain'] = False value['mailing_domain'] = []
return {'value': value} return {'value': value}
def action_duplicate(self, cr, uid, ids, context=None): def action_duplicate(self, cr, uid, ids, context=None):