From d32a5eddc850f482d0a88855462de5e5a0705223 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 8 Aug 2018 14:30:07 +0200 Subject: [PATCH] [FIX] point_of_sale: wrong behavior Price Control This is not expected since it leads to an inconsistent result: the user and the access rights do not match. Better add a PIN to the manager. This reverts commit bb8bb3cbfe07a23c0adad173a6afcc7bcaccedc7. --- addons/point_of_sale/static/src/js/screens.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 182af5308d4..95a7555e5d2 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -394,9 +394,7 @@ var NumpadWidget = PosBaseWidget.extend({ this.$el.find('.mode-button').click(_.bind(this.clickChangeMode, this)); }, applyAccessRights: function() { - var has_price_control_rights = !this.pos.config.restrict_price_control - || (this.pos.changed.cashier && this.pos.changed.cashier.role == 'manager') - || (!this.pos.changed.cashier && this.pos.get_cashier().role == 'manager'); + var has_price_control_rights = !this.pos.config.restrict_price_control || this.pos.get_cashier().role == 'manager'; this.$el.find('.mode-button[data-mode="price"]') .toggleClass('disabled-mode', !has_price_control_rights) .prop('disabled', !has_price_control_rights);