diff options
| author | Géry Debongnie <ged@odoo.com> | 2018-06-22 10:26:40 +0200 |
|---|---|---|
| committer | Adrien Dieudonne <adr@odoo.com> | 2018-07-06 14:09:09 +0200 |
| commit | eed4d586a026544facd35e3ca5184ef7f609c562 (patch) | |
| tree | 5b3ed2a53ab066094027a7014412bf53f066d80e /addons/web/static/src/js/_deprecated | |
| parent | dcc4d716234349c71f51edbd621963b5210c65de (diff) | |
[REF] *: rename web.pyeval into web.py_utils
The pyeval name is quite confusing, given that there is already an eval
and an evaluate function in py.js, and that the web.pyeval exports two
evaluate functions.
Since this file is more about odoo specific customization to py.js, it
is renamed in py_utils to better express its intended use.
Diffstat (limited to 'addons/web/static/src/js/_deprecated')
| -rw-r--r-- | addons/web/static/src/js/_deprecated/data.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/addons/web/static/src/js/_deprecated/data.js b/addons/web/static/src/js/_deprecated/data.js index eb70f330076..fd19ff61af7 100644 --- a/addons/web/static/src/js/_deprecated/data.js +++ b/addons/web/static/src/js/_deprecated/data.js @@ -7,7 +7,7 @@ var concurrency = require('web.concurrency'); var mixins = require('web.mixins'); var session = require('web.session'); var translation = require('web.translation'); -var pyeval = require('web.pyeval'); +var pyUtils = require('web.py_utils'); var _t = translation._t; @@ -85,9 +85,9 @@ var Query = Class.extend({ return session.rpc('/web/dataset/search_read', { model: this._model.name, fields: this._fields || false, - domain: pyeval.eval('domains', + domain: pyUtils.eval('domains', [this._model.domain(this._filter)]), - context: pyeval.eval('contexts', + context: pyUtils.eval('contexts', [this._model.context(this._context)]), offset: this._offset, limit: this._limit, @@ -138,7 +138,7 @@ var Query = Class.extend({ * @returns {jQuery.Deferred<Array<openerp.web.QueryGroup>> | null} */ group_by: function (grouping) { - var ctx = pyeval.eval( + var ctx = pyUtils.eval( 'context', this._model.context(this._context)); // undefined passed in explicitly (!) @@ -609,7 +609,7 @@ var DataSet = Class.extend(mixins.PropertiesMixin, { return session.rpc('/web/dataset/resequence', { model: this.model, ids: ids, - context: pyeval.eval( + context: pyUtils.eval( 'context', this.get_context(options.context)), }).then(function (results) { return results; @@ -797,7 +797,7 @@ var Model = Class.extend({ * Call a method (over RPC) on the bound OpenERP model. * * @param {String} method name of the method to call - * @param {Array} [args] positional arguments + * @param {Array} [args] positipyEvalonal arguments * @param {Object} [kwargs] keyword arguments * @param {Object} [options] additional options for the rpc() method * @returns {jQuery.Deferred<>} call result @@ -810,7 +810,7 @@ var Model = Class.extend({ kwargs = args; args = []; } - pyeval.ensure_evaluated(args, kwargs); + pyUtils.ensure_evaluated(args, kwargs); var call_kw = '/web/dataset/call_kw/' + this.name + '/' + method; return session.rpc(call_kw, { model: this.name, @@ -820,7 +820,7 @@ var Model = Class.extend({ }, options); }, call_button: function (method, args) { - pyeval.ensure_evaluated(args, {}); + pyUtils.ensure_evaluated(args, {}); return session.rpc('/web/dataset/call_button', { model: this.name, method: method, |
