Skip to Content
Menu
This question has been flagged
1 Reply
4895 Views

openerp.crmn = function(instance) {

var instance = openerp;

var _t = instance.web._t,

_lt = instance.web._lt;

var QWeb = instance.web.qweb;

instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.ListView.List# */{

render: function () {

this.$current.empty().append(

QWeb.render('ListView.rows', _.extend({

render_cell: function () {

return self.render_cell.apply(self, arguments); }

}, this)));

this.pad_table_to(1);

consle.log("test")

},

});

};

Avatar
Discard
Best Answer

To inherit existing class you have to use the .include statement. I think that your code could be like this (I didn't try it):

openerp.your_module_name = function(instance) {
"use strict";
var QWeb = instance.web.qweb;
var _t = instance.web._t;
var _lt = instance.web._lt;
instance.web.ListView.List.include(/** @lends instance.web.ListView.List# */{
render: function () {
this.$current.empty().append(
QWeb.render('ListView.rows', _.extend({
render_cell: function () {
return this.render_cell.apply(this, arguments); }
}, this)));
this.pad_table_to(1);
console.log("test")
},
});
};
Avatar
Discard