0
我需要重寫OpenERP 7中的JavaScript函數,以禁用某些我不需要的代碼(以隱藏「打印」按鈕)。不幸的是,這個函數在父類上調用了_super,所以我也需要調用它,但是沒有調用我試圖替換的函數。我如何在父類的父級上調用_super?在這種情況下,extend()和include()產生相同的結果。JavaScript-OpenERP:調用父親父母的_super()
這是我的完整代碼:
openerp.pos_fiscal_printer = function(instance) {
var module = instance.point_of_sale;
var _t = instance.web._t;
module.ReceiptScreenWidget.include({
show: function(){
//this._super();
var self = this;
this.add_action_button({
label: _t('Next Order'),
icon: '/point_of_sale/static/src/img/icons/png48/go-next.png',
click: function() { self.finishOrder(); },
});
},
});
}