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 #### Version 16.0.2.0.1
#### FIX #### FIX
- Removed the already existing function from payment screen js function. - 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) 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 Registries = require('point_of_sale.Registries');
const PaymentScreen = require('point_of_sale.PaymentScreen'); const PaymentScreen = require('point_of_sale.PaymentScreen');
var session = require('web.session');
const ValidateManagers = (PaymentScreen) => const ValidateManagers = (PaymentScreen) =>
class extends PaymentScreen { class extends PaymentScreen {
@ -22,9 +23,10 @@ odoo.define('pos_discount_manager.ValidateManager', function(require) {
if (flag != 1) { if (flag != 1) {
const {confirmed,payload} = await this.showPopup('NumberPopup', { const {confirmed,payload} = await this.showPopup('NumberPopup', {
title: this.env._t(employee_name + ', your discount is over the limit. \n Manager pin for Approval'), title: this.env._t(employee_name + ', your discount is over the limit. \n Manager pin for Approval'),
isPassword: true
}); });
if(confirmed){ 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 var pin = output[0].pin
if (Sha1.hash(payload) == pin) { if (Sha1.hash(payload) == pin) {
this.showScreen(this.nextScreen); this.showScreen(this.nextScreen);
@ -52,4 +54,4 @@ odoo.define('pos_discount_manager.ValidateManager', function(require) {
} }
Registries.Component.extend(PaymentScreen, ValidateManagers); Registries.Component.extend(PaymentScreen, ValidateManagers);
return ValidateManagers; return ValidateManagers;
}); });

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

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

2
pos_discount_manager/views/hr_employee_views.xml

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

Loading…
Cancel
Save