summaryrefslogtreecommitdiff
path: root/addons/google_drive/models
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-01-19 12:43:58 +0100
committerChristophe Simonis <chs@odoo.com>2018-01-19 12:43:58 +0100
commit2f95cfb8ed2a2e4dda2aee4f1f6f003587f9005c (patch)
treeb788f0bcbc56b155e35f2af195f1dd0273c8da11 /addons/google_drive/models
parentfdb585caf597b5a77d241087260ac42e3c3fb94e (diff)
parentf99c4f2b48b29f19a0d2ee1cd999008c92ab2a89 (diff)
[MERGE] forward port branch saas-16 up to f99c4f2b48b
Diffstat (limited to 'addons/google_drive/models')
-rw-r--r--addons/google_drive/models/google_drive.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/google_drive/models/google_drive.py b/addons/google_drive/models/google_drive.py
index 3e7235c2d75..784b60ebf57 100644
--- a/addons/google_drive/models/google_drive.py
+++ b/addons/google_drive/models/google_drive.py
@@ -153,6 +153,9 @@ class GoogleDrive(models.Model):
a length of 1 element only (batch processing is not supported in the code, though nothing really prevent it)
:return: the config id and config name
'''
+ # TO DO in master: fix my signature and my model
+ if isinstance(res_model, basestring):
+ 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."))
# check if a model is configured with a template