diff options
| author | Xavier Morel <xmo@openerp.com> | 2012-02-08 13:46:34 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2012-02-08 13:46:34 +0100 |
| commit | f5ee468ca5d6936688f8e8ae18a31ba65c8730ca (patch) | |
| tree | 45d2e8b88419dbc707276bba3a3c41090add78b4 /addons/web/static/src/js/core.js | |
| parent | ff570e8d233eef4445105ed4700eba3da1942c1c (diff) | |
[REF] rename Registry#clone to Registry#extend
bzr revid: xmo@openerp.com-20120208124634-qucyuwlangw15nqh
Diffstat (limited to 'addons/web/static/src/js/core.js')
| -rw-r--r-- | addons/web/static/src/js/core.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 4495334aa23..45e682d8bdf 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -328,12 +328,22 @@ openerp.web.Registry = openerp.web.Class.extend( /** @lends openerp.web.Registry * Creates and returns a copy of the current mapping, with the provided * mapping argument added in (replacing existing keys if needed) * + * Parent and child remain linked, a new key in the parent (which is not + * overwritten by the child) will appear in the child. + * * @param {Object} [mapping={}] a mapping of keys to object-paths */ - clone: function (mapping) { + extend: function (mapping) { var child = new openerp.web.Registry(mapping); child.parent = this; return child; + }, + /** + * @deprecated use Registry#extend + */ + clone: function (mapping) { + console.warn('Registry#clone is deprecated, use Registry#extend'); + return this.extend(mapping); } }); |
