|
|
@ -1,6 +1,5 @@ |
|
|
|
odoo.define('pos_refund_password.RefundPasswordButton', function (require) { |
|
|
|
'use strict'; |
|
|
|
|
|
|
|
const PosComponent = require('point_of_sale.PosComponent'); |
|
|
|
const ProductScreen = require('point_of_sale.ProductScreen'); |
|
|
|
const Registries = require('point_of_sale.Registries'); |
|
|
@ -8,7 +7,6 @@ odoo.define('pos_refund_password.RefundPasswordButton', function (require) { |
|
|
|
const TicketScreen = require('point_of_sale.TicketScreen'); |
|
|
|
const rpc = require("web.rpc"); |
|
|
|
|
|
|
|
|
|
|
|
const PosResTicketScreen1 = (TicketScreen) => |
|
|
|
class extends TicketScreen { |
|
|
|
async _onDoRefund() { |
|
|
@ -20,25 +18,21 @@ odoo.define('pos_refund_password.RefundPasswordButton', function (require) { |
|
|
|
}).then(result =>{ |
|
|
|
refund = result; |
|
|
|
}); |
|
|
|
body = this.env._t( |
|
|
|
const dialogProps = { |
|
|
|
body : this.env._t( |
|
|
|
'Incorrect Password') |
|
|
|
}; |
|
|
|
if (!refund){ |
|
|
|
|
|
|
|
refund=this.env.pos.config.refund_security; |
|
|
|
} |
|
|
|
refund=this.env.pos.config.refund_security; } |
|
|
|
const { confirmed, payload } = await this.showPopup('NumberPopup') |
|
|
|
if(refund == payload) |
|
|
|
{ |
|
|
|
super._onDoRefund(); |
|
|
|
} |
|
|
|
else{ |
|
|
|
this.showPopup('ErrorPopup',{body:body |
|
|
|
}) |
|
|
|
|
|
|
|
body = this.env._t( |
|
|
|
'Invalid Password') |
|
|
|
|
|
|
|
|
|
|
|
this.showPopup('ErrorPopup',{ |
|
|
|
body : this.env._t('Invalid Password'), |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|