Skip to content
Snippets Groups Projects
Unverified Commit 106840c3 authored by Danimar Ribeiro's avatar Danimar Ribeiro Committed by Martin Trigaux
Browse files

[FIX] mass_mailing: allow to quick create a mass_mailing

_rec_name in mass mailing is source_id which is an integer, it does not accept
a char value.
Instead specify the `name` value, which will create a utm.source.

Closes #13765
parent 649823b1
No related branches found
No related tags found
No related merge requests found
......@@ -424,6 +424,12 @@ class MassMailing(models.Model):
# Technical stuff
#------------------------------------------------------
@api.model
def name_create(self, name):
""" _rec_name is source_id, creates a utm.source instead """
mass_mailing = self.create({'name': name})
return mass_mailing.name_get()[0]
@api.multi
def copy(self, default=None):
self.ensure_one()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment