Skip to content

Commit 9cc1266

Browse files
committed
[FIX] point_of_sale: minimal rights employee should not put qty < 0
Fix issue where minimum rights employee were able to put negative orderline qty in the cart with the `+/-` button closes odoo#218246 Task-id: 4922318 X-original-commit: 037d103 Related: odoo/enterprise#89920 Signed-off-by: Stéphane Vanmeerhaeghe (stva) <[email protected]> Signed-off-by: Manu Vaillant (manv) <[email protected]>
1 parent e046269 commit 9cc1266

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

addons/point_of_sale/static/src/app/screens/product_screen/product_screen.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
Numpad,
1414
getButtons,
1515
DEFAULT_LAST_ROW,
16+
SWITCHSIGN,
1617
} from "@point_of_sale/app/components/numpad/numpad";
1718
import { ActionpadWidget } from "@point_of_sale/app/screens/product_screen/action_pad/action_pad";
1819
import { Orderline } from "@point_of_sale/app/components/orderline/orderline";
@@ -160,6 +161,9 @@ export class ProductScreen extends Component {
160161
BACKSPACE,
161162
]).map((button) => ({
162163
...button,
164+
disabled:
165+
button.disabled ||
166+
(button.value === SWITCHSIGN.value && this.pos.cashier._role === "minimal"),
163167
class: `
164168
${defaultLastRowValues.includes(button.value) ? "" : ""}
165169
${colorClassMap[button.value] || ""}

0 commit comments

Comments
 (0)