[FIX] core,google_drive: python3 compatibility

This commit is contained in:
Christophe Simonis
2018-01-19 13:42:26 +01:00
parent 088b6c3857
commit bd3869bd3a
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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."))
+1 -1
View File
@@ -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)