diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2018-01-03 14:15:07 +0100 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2018-01-17 09:35:32 +0100 |
| commit | 5140d3d10f53ebdd6124a9700d2adf6a8c571673 (patch) | |
| tree | 2d697c25925731c6cbcdb9534d692c3fe7549c66 /addons/google_drive/models | |
| parent | f05b2b120029da64679fc8dd9cd1f3f8b3c6abeb (diff) | |
[FIX] google_drive: adpating to new framework JS
The google_drive module has not been converted to the new Odoo Javascript framework, and hence was not even started.
This commit corrects that.
The logic is essentially the same as in previous versions
The test implemented contains an inevitable hack that makes sure no other test is affected,
in particular by the new route that the module calls (and that any Sidebar will call)
OPW 801145
closes #21993
Diffstat (limited to 'addons/google_drive/models')
| -rw-r--r-- | addons/google_drive/models/google_drive.py | 3 |
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 f0e494c8405..acb5508c90e 100644 --- a/addons/google_drive/models/google_drive.py +++ b/addons/google_drive/models/google_drive.py @@ -155,6 +155,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 |
