Can some guide me on how to solve this TypeError: self._super is not a function in odoo v12.
The error occurs on the bolded self._super() line in the code below
Thank you.
odoo.define('pos_allow_credit.pos', function (require) { "use strict"; var screens = require('point_of_sale.screens'); var models = require('point_of_sale.models'); var core = require('web.core'); var rpc = require('web.rpc'); var Session = require('web.Session'); var PosBaseWidget = require('point_of_sale.BaseWidget'); var QWeb = core.qweb; var _t = core._t; models.load_fields("res.partner", ['allow_credit']); screens.PaymentScreenWidget.include({ finalize_validation: function() { var self = this; if(self.pos.partner.allow_credit){ self._super(); } else { rpc.query({ model: 'res.partner', method: 'get_status', }) .then(function(result){ self._super(); }) .fail(function (error, event){ event.preventDefault(); self.pos.gui.show_popup('error',{ 'title': _t('Not Allowed'), 'body': _t("You are not Qualified"), }); return; }); } } }); });