mirror of https://github.com/OCA/social.git
[IMP] mass_mailing_partner: Add partner_name in error constrain message
parent
ddde8647cf
commit
a5d7adc72d
|
@ -23,8 +23,10 @@ class MailMassMailingContact(models.Model):
|
||||||
('id', '!=', contact.id)
|
('id', '!=', contact.id)
|
||||||
])
|
])
|
||||||
if contact.list_ids & other_contact.mapped('list_ids'):
|
if contact.list_ids & other_contact.mapped('list_ids'):
|
||||||
raise ValidationError(_("Partner already exists in one of "
|
raise ValidationError(
|
||||||
"these mailing lists"))
|
_("Partner already exists in one of these "
|
||||||
|
"mailing lists") + ": %s" % contact.partner_id.display_name
|
||||||
|
)
|
||||||
|
|
||||||
@api.onchange('partner_id')
|
@api.onchange('partner_id')
|
||||||
def _onchange_partner_mass_mailing_partner(self):
|
def _onchange_partner_mass_mailing_partner(self):
|
||||||
|
|
Loading…
Reference in New Issue