If you want to use this._super() to call the original method in OpenERP/Odoo When overriding a method using inheritance below is the example.
For example code look like below.
say_hello: function () {
setTimeout(function () {
this._super();
}.bind(this), 0);
}
// correct
say_hello: function () {
// don't forget .bind()
var _super = this._super.bind(this);
setTimeout(function () {
_super();
}.bind(this), 0);
}
Note-It is a reference to its value should be retained, it should not be accessed via this.
0 Comment(s)