[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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user