summaryrefslogtreecommitdiff
path: root/addons/test_mail/models
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-12-05 15:02:14 +0100
committerThibault Delavallée <tde@odoo.com>2017-12-12 15:46:37 +0100
commitcde06d5f5c7cbbe11366f6bb39f825172d8fe097 (patch)
tree4277b3f1ec3cc0c5cf050221a8151d414a709cb5 /addons/test_mail/models
parent56ae134bb223d16da712f5dcfe0d9a221feb5d72 (diff)
[IMP] test_mail: move some data into demo and update tests accordingly
Creating data directly in tests was done when tests were located in mail module to avoid creating real data or demo. Now that mail tests have their own module we can create demo data and use them in tests. It is simpler to have demo data for things like subtype and email templates to ease understanding and reuse.
Diffstat (limited to 'addons/test_mail/models')
-rw-r--r--addons/test_mail/models/test_mail_models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/test_mail/models/test_mail_models.py b/addons/test_mail/models/test_mail_models.py
index ec3e712fe38..4c1fd408ddf 100644
--- a/addons/test_mail/models/test_mail_models.py
+++ b/addons/test_mail/models/test_mail_models.py
@@ -62,13 +62,13 @@ class MailTestFull(models.Model):
if 'customer_id' in changes and record.mail_template:
res['customer_id'] = (record.mail_template, {'composition_mode': 'mass_mail'})
elif 'datetime' in changes:
- res['datetime'] = ('mail.track_template', {'composition_mode': 'mass_mail'})
+ res['datetime'] = ('test_mail.mail_test_full_tracking_view', {'composition_mode': 'mass_mail'})
return res
def _track_subtype(self, init_values):
self.ensure_one()
if 'umbrella_id' in init_values and self.umbrella_id:
- return 'mail.track_subtype_umbrella'
+ return 'test_mail.st_mail_test_full_umbrella_upd'
return super(MailTestFull, self)._track_subtype(init_values)
@@ -82,6 +82,7 @@ class MailTestAlias(models.Model):
name = fields.Char()
description = fields.Text()
+ customer_id = fields.Many2one('res.partner', 'Customer')
alias_id = fields.Many2one(
'mail.alias', 'Alias',
delegate=True)