تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5125 أدوات العرض

I need to override a JavaScript function in OpenERP 7, to disable some code which I don't need (to hide "Print" button and auto printing). Unfortunately this function calls _super on a parent class, so I also need to call it but without calling the function I'm trying to substitute. How can I call _super on the parent of the parent class? Both extend() and include() produce the same result in this case.

This is my complete code:

openerp.pos_test = 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(); },
            });
        },
    });
}

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
نوفمبر 24
1401
4
أكتوبر 24
3639
0
سبتمبر 22
38
1
مارس 15
6929
2
يناير 25
1099