[imp] removed useless function

bzr revid: nicolas.vanhoren@openerp.com-20120227124958-ehlps91290hrwo9o
This commit is contained in:
niv-openerp
2012-02-27 13:49:58 +01:00
parent c0232fb748
commit aca64bb558
-25
View File
@@ -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
*