diff options
| author | Raphael Collet <rco@openerp.com> | 2017-01-27 16:16:16 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2017-02-22 15:24:06 +0100 |
| commit | b3c97f08bbf9c33959e060ddea42054f7f32a5c7 (patch) | |
| tree | b0c17c2593b07cce6208a8de8ca55f907a8b6efb /addons/mail | |
| parent | dfec1fa7787e1675186403a792c1ab2f246c5c07 (diff) | |
[FIX] mail: when initializing aliases, force reflection of models
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/models/mail_alias.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/mail/models/mail_alias.py b/addons/mail/models/mail_alias.py index 07d6bfb3d58..67233efcd77 100644 --- a/addons/mail/models/mail_alias.py +++ b/addons/mail/models/mail_alias.py @@ -239,6 +239,11 @@ class AliasMixin(models.AbstractModel): if name != 'alias_id': return + # both self and the alias model must be present in 'ir.model' + IM = self.env['ir.model'] + IM._reflect_model(self) + IM._reflect_model(self.env[self.get_alias_model_name({})]) + alias_ctx = { 'alias_model_name': self.get_alias_model_name({}), 'alias_parent_model_name': self._name, |
