diff options
| author | Christophe Simonis <chs@openerp.com> | 2011-10-27 17:31:32 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2011-10-27 17:31:32 +0200 |
| commit | 6f899d86c010300295dc64977849e87f67b93731 (patch) | |
| tree | dbb3e5dcd1fe50d4864793c4d64747ad64fe0f8a /addons/web/static/src/js/data.js | |
| parent | 9d4602fcb83c0499583b24feb11908ef3ea8c3cf (diff) | |
[IMP] rename Session to Connection and create one at initialisation
bzr revid: chs@openerp.com-20111027153132-qoj0fiwoj813gsda
Diffstat (limited to 'addons/web/static/src/js/data.js')
| -rw-r--r-- | addons/web/static/src/js/data.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index 069506586ad..4e14b9eb6a9 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -32,7 +32,7 @@ openerp.web.DataGroup = openerp.web.Widget.extend( /** @lends openerp.web.DataG * @constructs openerp.web.DataGroup * @extends openerp.web.Widget * - * @param {openerp.web.Session} session Current OpenERP session + * @param {openerp.web.Widget} parent widget * @param {String} model name of the model managed by this DataGroup * @param {Array} domain search domain for this DataGroup * @param {Object} context context of the DataGroup's searches @@ -785,11 +785,15 @@ openerp.web.ProxyDataSet = openerp.web.DataSetSearch.extend({ on_unlink: function(ids) {} }); -openerp.web.Model = openerp.web.SessionAware.extend({ - init: function(session, model_name) { - this._super(session); +openerp.web.Model = openerp.web.CallbackEnabled.extend({ + init: function(_, model_name) { + this._super(); this.model_name = model_name; }, + rpc: function() { + var c = openerp.connector; + return c.rpc.apply(c, arguments); + }, get_func: function(method_name) { var self = this; return function() { |
