From aca64bb558ebe2b617620eb62678107dccce971a Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 27 Feb 2012 13:49:58 +0100 Subject: [PATCH] [imp] removed useless function bzr revid: nicolas.vanhoren@openerp.com-20120227124958-ehlps91290hrwo9o --- addons/web/static/src/js/core.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index bdc8059ff63..6ff8f86dcc3 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -72,31 +72,6 @@ openerp.web.callback = function(obj, method) { }); }; -/** - * Generates an inherited class that replaces all the methods by null methods (methods - * that does nothing and always return undefined). - * - * @param {Class} claz - * @param {Object} add Additional functions to override. - * @return {Class} - */ -openerp.web.generate_null_object_class = function(claz, add) { - var newer = {}; - var copy_proto = function(prototype) { - for (var name in prototype) { - if(typeof prototype[name] == "function") { - newer[name] = function() {}; - } - } - if (prototype.prototype) - copy_proto(prototype.prototype); - }; - copy_proto(claz.prototype); - newer.init = openerp.web.Widget.prototype.init; - var tmpclass = claz.extend(newer); - return tmpclass.extend(add || {}); -}; - /** * web error for lookup failure *