diff options
| author | Vincent Schippefilt <vsc@odoo.com> | 2019-03-06 14:02:32 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2019-03-06 20:07:17 +0100 |
| commit | ab56e637b7f97ddcdbcc9baea99ae097e342409c (patch) | |
| tree | 4cb47da9f7ef89b19d18429220a7507470ec12a9 /addons/web/static/src/js/tools/debug_manager.js | |
| parent | eeed894fd50e477135e1ac9a82f6e98ce063ab90 (diff) | |
[REF] web: adapt code after jQuery update
Part of task 1896658
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/tools/debug_manager.js')
| -rw-r--r-- | addons/web/static/src/js/tools/debug_manager.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/addons/web/static/src/js/tools/debug_manager.js b/addons/web/static/src/js/tools/debug_manager.js index f09d8745f04..172148e03ef 100644 --- a/addons/web/static/src/js/tools/debug_manager.js +++ b/addons/web/static/src/js/tools/debug_manager.js @@ -62,7 +62,7 @@ var DebugManager = Widget.extend({ this._has_features = false; // whether the current user is an administrator this._is_admin = session.is_system; - return $.when( + return Promise.resolve( this._rpc({ model: 'res.users', method: 'check_access_rights', @@ -160,7 +160,7 @@ var DebugManager = Widget.extend({ .append(QWeb.render('WebClient.DebugManager.Global', { manager: this, })); - return $.when(); + return Promise.resolve(); }, select_view: function () { var self = this; @@ -281,7 +281,7 @@ DebugManager.include({ model: 'ir.model', method: 'search', args: [[['model', '=', model]]] - }).done(function (ids) { + }).then(function (ids) { self.do_action({ res_model: 'ir.model.fields', name: _t('View Fields'), @@ -324,7 +324,7 @@ DebugManager.include({ DebugManager.include({ start: function () { this._can_edit_views = false; - return $.when( + return Promise.all([ this._super(), this._rpc({ model: 'ir.ui.view', @@ -334,6 +334,7 @@ DebugManager.include({ .then(function (ar) { this._can_edit_views = ar; }.bind(this)) + ] ); }, update: function (tag, descriptor, widget) { @@ -382,7 +383,7 @@ DebugManager.include({ model: this._action.res_model, method: 'get_metadata', args: [selectedIDs], - }).done(function(result) { + }).then(function(result) { var metadata = result[0]; metadata.creator = field_utils.format.many2one(metadata.create_uid); metadata.lastModifiedBy = field_utils.format.many2one(metadata.write_uid); @@ -515,7 +516,7 @@ DebugManager.include({ true, condition || false, ], - }).done(function () { d.close(); }); + }).then(function () { d.close(); }); }} ] }); |
