summaryrefslogtreecommitdiff
path: root/addons/test_mass_mailing/models/mass_mail_test.py
diff options
context:
space:
mode:
authorDavid Beguin <dbe@odoo.com>2018-10-30 12:24:44 +0000
committerDavid Beguin <dbe@odoo.com>2018-11-20 11:37:05 +0000
commit692f0062fb6b2b0b34d2803ae1644e7f5a2d3028 (patch)
treef716d3615d32d28abfecd251bb569c478837d7dc /addons/test_mass_mailing/models/mass_mail_test.py
parent1007df3dc3413b2b30af8a3feba023840f7566a3 (diff)
[IMP] mail, mass_mailing, crm : stringify _primary_email
_primary_email was an array to be able to use it directly in the depends. Typically a 'depends' with a computed value (lambda) needs an array. Otherwise, it will only take the first character of the field name string. By setting _primary_email as a string, the lambda should always get an array. But it simplifies a lot the usage of the _primary_email. also, having an array was confusing as we could think that more than one field can be considered as the primary email. This is not the goal hare. So having the _primary_email as a single string is more 'self describing'. Only one field should be the _primary_email.
Diffstat (limited to 'addons/test_mass_mailing/models/mass_mail_test.py')
-rw-r--r--addons/test_mass_mailing/models/mass_mail_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/test_mass_mailing/models/mass_mail_test.py b/addons/test_mass_mailing/models/mass_mail_test.py
index ac9d3eeb65a..f42fe1c872e 100644
--- a/addons/test_mass_mailing/models/mass_mail_test.py
+++ b/addons/test_mass_mailing/models/mass_mail_test.py
@@ -10,7 +10,7 @@ class MassMailTest(models.Model):
_description = 'Simple Mass Mailing Model'
_name = 'mass.mail.test'
_inherit = ['mail.thread', 'mail.address.mixin']
- _primary_email = ['email_from']
+ _primary_email = 'email_from'
name = fields.Char()
email_from = fields.Char()
@@ -22,7 +22,7 @@ class MassMailTestBlacklist(models.Model):
_name = 'mass.mail.test.bl'
_inherit = ['mail.thread', 'mail.blacklist.mixin']
- _primary_email = ['email_from'] # blacklist field to check
+ _primary_email = 'email_from' # blacklist field to check
name = fields.Char()
email_from = fields.Char()