[FIX] crm, mail, mass_mailing: default bounce

Set a default bounce to zero. Otherwise, if not set, filtering on the
number of bounces doesn't work correctly.

opw-744558
This commit is contained in:
Nicolas Martinelli
2017-06-01 09:56:47 +02:00
parent 60401156c0
commit fbc5312c79
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ class Lead(models.Model):
date_conversion = fields.Datetime('Conversion Date', readonly=True)
# Messaging and marketing
message_bounce = fields.Integer('Bounce', help="Counter of the number of bounced emails for this contact")
message_bounce = fields.Integer('Bounce', help="Counter of the number of bounced emails for this contact", default=0)
# Only used for type opportunity
probability = fields.Float('Probability', group_operator="avg", default=lambda self: self._default_probability())
+1 -1
View File
@@ -18,7 +18,7 @@ class Partner(models.Model):
_mail_flat_thread = False
_mail_mass_mailing = _('Customers')
message_bounce = fields.Integer('Bounce', help="Counter of the number of bounced emails for this contact")
message_bounce = fields.Integer('Bounce', help="Counter of the number of bounced emails for this contact", default=0)
opt_out = fields.Boolean(
'Opt-Out', help="If opt-out is checked, this contact has refused to receive emails for mass mailing and marketing campaign. "
"Filter 'Available for Mass Mailing' allows users to filter the partners when performing mass mailing.")
+1 -1
View File
@@ -77,7 +77,7 @@ class MassMailingContact(models.Model):
'contact_id', 'list_id', string='Mailing Lists')
opt_out = fields.Boolean(string='Opt Out', help='The contact has chosen not to receive mails anymore from this list')
unsubscription_date = fields.Datetime(string='Unsubscription Date')
message_bounce = fields.Integer(string='Bounced', help='Counter of the number of bounced emails for this contact.')
message_bounce = fields.Integer(string='Bounced', help='Counter of the number of bounced emails for this contact.', default=0)
country_id = fields.Many2one('res.country', string='Country')
tag_ids = fields.Many2many('res.partner.category', string='Tags')