diff options
| author | Raphael Collet <rco@odoo.com> | 2017-09-21 11:05:38 +0200 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2017-09-21 16:10:13 +0200 |
| commit | c21fed6ea477beecf66afffb87f7004642b98f97 (patch) | |
| tree | 02a5ea403fb1c2bf9cb774b434d114aa5a4a9b15 /addons/mass_mailing/wizard/mail_compose_message.py | |
| parent | 0b5087011b3ad3feb9a93bacbaa79316b335ef6b (diff) | |
[FIX] performance: use `IrModel._get` instead of search
Diffstat (limited to 'addons/mass_mailing/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mass_mailing/wizard/mail_compose_message.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mass_mailing/wizard/mail_compose_message.py b/addons/mass_mailing/wizard/mail_compose_message.py index 6147b028a18..8708dd9a098 100644 --- a/addons/mass_mailing/wizard/mail_compose_message.py +++ b/addons/mass_mailing/wizard/mail_compose_message.py @@ -37,7 +37,7 @@ class MailComposeMessage(models.TransientModel): 'reply_to': reply_to, 'sent_date': fields.Datetime.now(), 'body_html': self.body, - 'mailing_model_id': self.env['ir.model'].search([('model', '=', self.model)], limit=1).id, + 'mailing_model_id': self.env['ir.model']._get(self.model).id, 'mailing_domain': self.active_domain, }) |
