Skip to content

Commit ca2fa82

Browse files
committed
[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
1 parent 05f176f commit ca2fa82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

addons/mass_mailing/models/mass_mailing.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ def default_get(self, cr, uid, fields, context=None):
461461
'reply_to': lambda self, cr, uid, ctx=None: self.pool['mail.message']._get_default_from(cr, uid, context=ctx),
462462
'mailing_model': 'mail.mass_mailing.contact',
463463
'contact_ab_pc': 100,
464+
'mailing_domain': [],
464465
}
465466

466467
#------------------------------------------------------
@@ -517,7 +518,7 @@ def on_change_model_and_list(self, cr, uid, ids, mailing_model, list_ids, contex
517518
else:
518519
value['mailing_domain'] = "[('list_id', '=', False)]"
519520
else:
520-
value['mailing_domain'] = False
521+
value['mailing_domain'] = []
521522
return {'value': value}
522523

523524
def action_duplicate(self, cr, uid, ids, context=None):

0 commit comments

Comments
 (0)