Browse Source

Nov 24 : [FIX] Bug Fixed 'pos_discount_manager'

pull/295/head
AjmalCybro 2 years ago
parent
commit
41a7325ac3
  1. 8
      pos_discount_manager/doc/RELEASE_NOTES.md
  2. 2
      pos_discount_manager/static/src/js/PosSession.js
  3. 6
      pos_discount_manager/static/src/js/ValidateManager.js
  4. 2
      pos_discount_manager/static/src/xml/NumberPopup.xml
  5. 2
      pos_discount_manager/views/hr_employee_views.xml

8
pos_discount_manager/doc/RELEASE_NOTES.md

@ -9,4 +9,10 @@
#### Version 16.0.2.0.1
#### FIX
- Removed the already existing function from payment screen js function.
- Super the existing button action.
- Super the existing button action.
#### 20.11.2023
#### Version 16.0.2.0.2
#### UPDATE
- Manager Pin Encrypted in NumberPad.
- Changed Pin Condition Check from Top Sequence Manager to Session Manager.

2
pos_discount_manager/static/src/js/PosSession.js

@ -13,4 +13,4 @@ odoo.define('pos_discount_manager.PosSession', function(require) {
}
}
Registries.Model.extend(PosGlobalState,NewPosGlobalState)
});
});

6
pos_discount_manager/static/src/js/ValidateManager.js

@ -3,6 +3,7 @@ odoo.define('pos_discount_manager.ValidateManager', function(require) {
const Registries = require('point_of_sale.Registries');
const PaymentScreen = require('point_of_sale.PaymentScreen');
var session = require('web.session');
const ValidateManagers = (PaymentScreen) =>
class extends PaymentScreen {
@ -22,9 +23,10 @@ odoo.define('pos_discount_manager.ValidateManager', function(require) {
if (flag != 1) {
const {confirmed,payload} = await this.showPopup('NumberPopup', {
title: this.env._t(employee_name + ', your discount is over the limit. \n Manager pin for Approval'),
isPassword: true
});
if(confirmed){
var output = this.env.pos.employees.filter((obj) => obj.role == 'manager');
var output = this.env.pos.employees.filter((obj) => obj.role == 'manager' && obj.user_id == session.uid);
var pin = output[0].pin
if (Sha1.hash(payload) == pin) {
this.showScreen(this.nextScreen);
@ -52,4 +54,4 @@ odoo.define('pos_discount_manager.ValidateManager', function(require) {
}
Registries.Component.extend(PaymentScreen, ValidateManagers);
return ValidateManagers;
});
});

2
pos_discount_manager/static/src/xml/NumberPopup.xml

@ -72,4 +72,4 @@
</div>
</Draggable>
</t>
</templates>
</templates>

2
pos_discount_manager/views/hr_employee_views.xml

@ -12,4 +12,4 @@
</xpath>
</field>
</record>
</odoo>
</odoo>

Loading…
Cancel
Save