[FIX] core,google_drive: python3 compatibility
This commit is contained in:
@@ -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."))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user