diff options
| author | Adrian Torres <adt@odoo.com> | 2018-11-08 15:27:30 +0000 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2018-11-29 09:28:17 +0000 |
| commit | 52f5528cfb6d1152ee226e268247dc685a8ba329 (patch) | |
| tree | b44ecfa477b50dd3e488f09f623eecc8bc8e9d7d /addons/mail/wizard/mail_compose_message.py | |
| parent | e5c864a596b72515837f0ed1e07550398ecc1ab0 (diff) | |
[REF] *: replace deprecated pycompat helpers for builtins
This commit replaces calls to pycompat helpers that were intended for
python 2 <-> python 3 interoperability for python 3 builtins, as python
2 is no longer officially supported by Odoo.
This includes:
* calls to imap/izip/ifilter replaced by map/zip/filter
* uses of text_type replaced by str
* uses of unichr replaced by chr
* calls to implements_to_string, implements_iterator removed
* string_types and integer_types replaced by str, int respectively
* calls to to_native replaced by calls to to_text
This is done in preparation to the removal of these deprecated helpers
in the following commit.
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index b9a5845896c..c2ef637d299 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -5,7 +5,6 @@ import base64 import re from odoo import _, api, fields, models, SUPERUSER_ID, tools -from odoo.tools import pycompat from odoo.tools.safe_eval import safe_eval @@ -453,7 +452,7 @@ class MailComposer(models.TransientModel): """ self.ensure_one() multi_mode = True - if isinstance(res_ids, pycompat.integer_types): + if isinstance(res_ids, int): multi_mode = False res_ids = [res_ids] @@ -503,7 +502,7 @@ class MailComposer(models.TransientModel): """ Call email_template.generate_email(), get fields relevant for mail.compose.message, transform email_cc and email_to into partner_ids """ multi_mode = True - if isinstance(res_ids, pycompat.integer_types): + if isinstance(res_ids, int): multi_mode = False res_ids = [res_ids] |
