diff --git a/pos_refund_password/__manifest__.py b/pos_refund_password/__manifest__.py index 83d8c55f7..7d5d9f362 100644 --- a/pos_refund_password/__manifest__.py +++ b/pos_refund_password/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################# { 'name': 'Restrict POS Refund with Password In Odoo 16', - 'version': '16.0.1.0.0', + 'version': '16.0.1.0.1', 'summary': """Restrict POS Refund with Password In Odoo 16""", 'description': """Restrict POS Refund with Password In Odoo 16""", 'category': 'Point of Sale', diff --git a/pos_refund_password/doc/RELEASE_NOTES.md b/pos_refund_password/doc/RELEASE_NOTES.md index 8faf82d81..4e296ac2b 100644 --- a/pos_refund_password/doc/RELEASE_NOTES.md +++ b/pos_refund_password/doc/RELEASE_NOTES.md @@ -3,4 +3,8 @@ #### 30.12.2022 #### Version 16.0.1.0.0 #### ADD -- Initial commit for pos_refund_password odoo \ No newline at end of file +- Initial commit for pos_refund_password odoo +#### 28.03.2023 +#### Version 16.0.1.0.1 +#### FIX +- Fixed the undeclared body diff --git a/pos_refund_password/model/refund_password.py b/pos_refund_password/model/refund_password.py index af10fbcb1..e213e556f 100644 --- a/pos_refund_password/model/refund_password.py +++ b/pos_refund_password/model/refund_password.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from odoo import models, fields, api +from odoo import models, fields class PosConfig(models.Model): @@ -15,3 +15,4 @@ class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' global_refund_security = fields.Integer(string='Global Refund Security',config_parameter='pos_refund_password.global_refund_security') + diff --git a/pos_refund_password/static/src/js/refund_password.js b/pos_refund_password/static/src/js/refund_password.js index 67c64a796..bfcd8f8fc 100644 --- a/pos_refund_password/static/src/js/refund_password.js +++ b/pos_refund_password/static/src/js/refund_password.js @@ -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'), + }); } }