From 4504ea1ca22e5eeb3ed6b9f7c42bac6f25f3500c Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Thu, 17 Mar 2011 17:27:00 +0100 Subject: [PATCH] on_log temporary back to session bzr revid: al@openerp.com-20110317162700-tv0iq7a9us986i9o --- addons/base/static/openerp/js/base_chrome.js | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/base/static/openerp/js/base_chrome.js b/addons/base/static/openerp/js/base_chrome.js index dedab94eeab..3685d64e860 100644 --- a/addons/base/static/openerp/js/base_chrome.js +++ b/addons/base/static/openerp/js/base_chrome.js @@ -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; - $('
').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;
+                $('
').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;