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/core | |
| 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/core')
| -rw-r--r-- | addons/web/static/src/js/core/context.js | 4 | ||||
| -rw-r--r-- | addons/web/static/src/js/core/domain.js | 4 | ||||
| -rw-r--r-- | addons/web/static/src/js/core/py_utils.js (renamed from addons/web/static/src/js/core/pyeval.js) | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/src/js/core/context.js b/addons/web/static/src/js/core/context.js index 53254bd718a..a7ce801708d 100644 --- a/addons/web/static/src/js/core/context.js +++ b/addons/web/static/src/js/core/context.js @@ -2,7 +2,7 @@ odoo.define('web.Context', function (require) { "use strict"; var Class = require('web.Class'); -var pyeval = require('web.pyeval'); +var pyUtils = require('web.py_utils'); var Context = Class.extend({ init: function () { @@ -24,7 +24,7 @@ var Context = Class.extend({ return this; }, eval: function () { - return pyeval.eval('context', this); + return pyUtils.eval('context', this); }, /** * Set the evaluation context to be used when we actually eval. diff --git a/addons/web/static/src/js/core/domain.js b/addons/web/static/src/js/core/domain.js index 8ce570b8605..86e1f85a634 100644 --- a/addons/web/static/src/js/core/domain.js +++ b/addons/web/static/src/js/core/domain.js @@ -2,7 +2,7 @@ odoo.define("web.Domain", function (require) { "use strict"; var collections = require("web.collections"); -var pyeval = require("web.pyeval"); +var pyUtils = require("web.py_utils"); /** * The Domain Class allows to work with a domain as a tree and provides tools @@ -240,7 +240,7 @@ var Domain = collections.Tree.extend({ */ stringToArray: function (domain, evalContext) { if (!_.isString(domain)) return _.clone(domain); - return pyeval.eval("domain", domain ? domain.replace(/%%/g, '%') : "[]", evalContext); + return pyUtils.eval("domain", domain ? domain.replace(/%%/g, '%') : "[]", evalContext); }, /** * Makes implicit "&" operators explicit in the given JS prefix-array diff --git a/addons/web/static/src/js/core/pyeval.js b/addons/web/static/src/js/core/py_utils.js index 47d6d07bf64..8590965cee2 100644 --- a/addons/web/static/src/js/core/pyeval.js +++ b/addons/web/static/src/js/core/py_utils.js @@ -1,4 +1,4 @@ -odoo.define('web.pyeval', function (require) { +odoo.define('web.py_utils', function (require) { "use strict"; var core = require('web.core'); |
