[FIX] mass_mailing: replace customer by customer_rank
Since odoo/odoo@8b7f42ab and odoo/odoo@8766f388 fields customer and supplier on `res.partner` have been replaced with `customer_rank` and `supplier_rank` closes odoo/odoo#36067 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
@@ -211,7 +211,7 @@ class MassMailing(models.Model):
|
||||
else:
|
||||
mailing_domain = [(0, '=', 1)]
|
||||
elif self.mailing_model_name == 'res.partner':
|
||||
mailing_domain = [('customer', '=', True)]
|
||||
mailing_domain = [('customer_rank', '>', 0)]
|
||||
elif 'opt_out' in self.env[self.mailing_model_name]._fields and not self.mailing_domain:
|
||||
mailing_domain = [('opt_out', '=', False)]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user