Browse Source

Apr 02: [FIX] Bug Fixed 'pos_refund_passwod'

pull/278/merge
RisvanaCybro 1 year ago
parent
commit
466734d628
  1. 9
      pos_refund_password/doc/RELEASE_NOTES.md
  2. 8
      pos_refund_password/model/refund_password.py
  3. 6
      pos_refund_password/static/src/js/refund_password.js

9
pos_refund_password/doc/RELEASE_NOTES.md

@ -4,11 +4,18 @@
#### Version 16.0.1.0.0 #### Version 16.0.1.0.0
#### ADD #### ADD
- Initial commit for pos_refund_password odoo - Initial commit for pos_refund_password odoo
#### 28.03.2023 #### 28.03.2023
#### Version 16.0.1.0.1 #### Version 16.0.1.0.1
#### FIX #### FIX
- Fixed the undeclared body - Fixed the undeclared body
- #### 06.09.2023
#### 06.09.2023
#### Version 16.0.1.0.2 #### Version 16.0.1.0.2
#### FIX #### FIX
- Fixed the refund password issue - Fixed the refund password issue
#### 28.03.2024
#### Version 16.0.1.0.3
#### FIX
- Fixed the access right issue.

8
pos_refund_password/model/refund_password.py

@ -19,7 +19,7 @@
# If not, see <http://www.gnu.org/licenses/>. # If not, see <http://www.gnu.org/licenses/>.
# #
############################################################################### ###############################################################################
from odoo import models, fields from odoo import models, fields, api
class PosConfig(models.Model): class PosConfig(models.Model):
@ -36,3 +36,9 @@ class ResConfigSettings(models.TransientModel):
global_refund_security = fields.Integer( global_refund_security = fields.Integer(
string='Global Refund Security', string='Global Refund Security',
config_parameter='pos_refund_password.global_refund_security') config_parameter='pos_refund_password.global_refund_security')
@api.model
def get_value(self):
security_password = self.env['ir.config_parameter'].sudo().get_param(
'pos_refund_password.global_refund_security')
return security_password

6
pos_refund_password/static/src/js/refund_password.js

@ -13,9 +13,9 @@ odoo.define('pos_refund_password.RefundPasswordButton', function (require) {
var refund=""; var refund="";
var session_refund= false; var session_refund= false;
var data = await rpc.query({ var data = await rpc.query({
model: 'ir.config_parameter', model: 'res.config.settings',
method: 'get_param', method: 'get_value',
args:["pos_refund_password.global_refund_security"], args:[],
}) })
.then(result =>{ .then(result =>{
refund = result; refund = result;

Loading…
Cancel
Save