From 6f899d86c010300295dc64977849e87f67b93731 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 27 Oct 2011 17:31:32 +0200 Subject: [IMP] rename Session to Connection and create one at initialisation bzr revid: chs@openerp.com-20111027153132-qoj0fiwoj813gsda --- addons/web/static/src/js/data.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'addons/web/static/src/js/data.js') 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() { -- cgit v1.2.3