diff options
Diffstat (limited to 'addons/mail/wizard')
| -rw-r--r-- | addons/mail/wizard/invite.py | 2 | ||||
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/wizard/invite.py b/addons/mail/wizard/invite.py index a70b98f53e0..2069f887895 100644 --- a/addons/mail/wizard/invite.py +++ b/addons/mail/wizard/invite.py @@ -18,7 +18,7 @@ class Invite(models.TransientModel): if self._context.get('mail_invite_follower_channel_only'): result['send_mail'] = False if 'message' in fields and model and res_id: - model_name = self.env['ir.model'].search([('model', '=', self.pool[model]._name)]).name_get()[0][1] + model_name = self.env['ir.model'].search([('model', '=', model)]).name_get()[0][1] document_name = self.env[model].browse(res_id).name_get()[0][1] message = _('<div><p>Hello,</p><p>%s invited you to follow %s document: %s.</p></div>') % (user_name, model_name, document_name) result['message'] = message diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index e60ac5db4e7..585d1128a7a 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -65,7 +65,7 @@ class MailComposer(models.TransientModel): result['model'] = result.get('model', self._context.get('active_model')) result['res_id'] = result.get('res_id', self._context.get('active_id')) result['parent_id'] = result.get('parent_id', self._context.get('message_id')) - if 'no_auto_thread' not in result and (not result['model'] or not result['model'] in self.pool or not hasattr(self.env[result['model']], 'message_post')): + if 'no_auto_thread' not in result and (result['model'] not in self.env or not hasattr(self.env[result['model']], 'message_post')): result['no_auto_thread'] = True # default values according to composition mode - NOTE: reply is deprecated, fall back on comment |
