我正在odoo8中扩展POS中的一个函数,当我通过调用(函数'ping')调用后端时,我遇到了一个问题,并且在回调中self._super为null而self本身似乎是正好。什么可能导致_super被改为null?谢谢你对此事的任何帮助。
openerp.something = function(instance){
var module = instance.point_of_sale;
module.PaymentScreenWidget.include({
validate_order: function(options) {
var self = this;
var currentOrder = this.pos.get('selectedOrder').export_as_JSON();
var companyVAT = this.pos.company.vat;
var orderModel = new instance.web.Model('pos.order');
orderModel.call('ping', [currentOrder, companyVAT]).then(function (responded) {
if(responded)
self._super(options);
else alert('didnt respond');
});
debugger;
}});};