[FIX] point_of_sale: deactivate price change on switch from admin on price control (#26994)

Usecase:
* Activate price control on point of sale.
* In pos session, as administrator, activate pricechange modus.
* switch to normal user.

Before fix normal user can change the price.
After fix the modus will automatically switch to quantity.
This commit is contained in:
Gert Pellin - GPE
2018-09-17 14:07:22 +02:00
committed by GitHub
parent 2c7db14261
commit 5dba2b6e09
@@ -399,6 +399,9 @@ var NumpadWidget = PosBaseWidget.extend({
this.$el.find('.mode-button[data-mode="price"]')
.toggleClass('disabled-mode', !has_price_control_rights)
.prop('disabled', !has_price_control_rights);
if (!has_price_control_rights && this.state.get('mode')=='price'){
this.state.changeMode('quantity');
}
},
clickDeleteLastChar: function() {
return this.state.deleteLastChar();