on_log temporary back to session

bzr revid: al@openerp.com-20110317162700-tv0iq7a9us986i9o
This commit is contained in:
Antony Lesuisse 2011-03-17 17:27:00 +01:00
parent 38c3d7c344
commit 4504ea1ca2
1 changed files with 12 additions and 12 deletions

View File

@ -105,18 +105,6 @@ openerp.base.Console = openerp.base.BasicController.extend({
init: function(element_id, server, port) {
this._super(element_id);
},
on_log: function() {
// TODO this should move to Console and be active only in debug
// TODO $element should be for error not log
var self = this;
this._super.apply(this,arguments);
$.each(arguments, function(i,v) {
if(self.$element) {
v = v==null ? "null" : v;
$('<pre></pre>').text(v.toString()).appendTo(self.$element);
}
});
}
});
openerp.base.Database = openerp.base.BasicController.extend({
@ -139,6 +127,18 @@ openerp.base.Session = openerp.base.BasicController.extend({
this.module_loaded = {"base": true};
this.context = {};
},
on_log: function() {
// TODO this should move to Console and be active only in debug
// TODO $element should be for error not log
var self = this;
this._super.apply(this,arguments);
$.each(arguments, function(i,v) {
if(self.$element) {
v = v==null ? "null" : v;
$('<pre></pre>').text(v.toString()).appendTo(self.$element);
}
});
},
rpc: function(url, params, success_callback, error_callback) {
// Construct a JSON-RPC2 request, method is currently unused
params.session_id = this.session_id;