diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-01-19 13:41:40 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-01-19 13:42:26 +0100 |
| commit | bd3869bd3aaf93fc1b5ce659474f5b8769a935a2 (patch) | |
| tree | d669394d74e0f4e840e6f07bcce424f48e292667 | |
| parent | 088b6c3857893e20da7ae0d6d72983870e1acf0c (diff) | |
[FIX] core,google_drive: python3 compatibility
| -rw-r--r-- | addons/google_drive/models/google_drive.py | 3 | ||||
| -rw-r--r-- | odoo/tools/yaml_import.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/addons/google_drive/models/google_drive.py b/addons/google_drive/models/google_drive.py index 784b60ebf57..cf5e8c55345 100644 --- a/addons/google_drive/models/google_drive.py +++ b/addons/google_drive/models/google_drive.py @@ -9,6 +9,7 @@ import werkzeug.urls from odoo import api, fields, models from odoo.exceptions import RedirectWarning, UserError +from odoo.tools import pycompat from odoo.tools.safe_eval import safe_eval from odoo.tools.translate import _ @@ -154,7 +155,7 @@ class GoogleDrive(models.Model): :return: the config id and config name ''' # TO DO in master: fix my signature and my model - if isinstance(res_model, basestring): + if isinstance(res_model, pycompat.string_types): res_model = self.env['ir.model'].search([('model', '=', res_model)]).id if not res_id: raise UserError(_("Creating google drive may only be done by one at a time.")) diff --git a/odoo/tools/yaml_import.py b/odoo/tools/yaml_import.py index 674047cd22a..7afffab2a0d 100644 --- a/odoo/tools/yaml_import.py +++ b/odoo/tools/yaml_import.py @@ -726,7 +726,7 @@ class YamlInterpreter(object): if node.target: values['target'] = node.target - if node.src_model and isinstance(node.src_model, basestring): + if node.src_model and isinstance(node.src_model, pycompat.string_types): values['binding_model_id'] = self.env['ir.model']._get(node.src_model).id id = self.sudo_env['ir.model.data']._update('ir.actions.act_window', self.module, values, node.id, mode=self.mode) |
