[FIX] point_of_sale: prevent scanning on receipt
- Sell a Product A - From receipt screen, scan the barcode of Product B - B will be in tab along with A - Pay and validate - Close the session Only an order with Product A is recorded in the session (order 1). When performing this set of actions, a new order is not created: the POS simply reuses the current order. However, `create_from_ui` (called in the receipt screen) discards an order if the reference already exists. This means that the first order is correctly synchronized at validation, while the second order is silently discarded. Closes #16781 opw-766459
This commit is contained in:
committed by
Nicolas Martinelli
parent
9bba7fea42
commit
9b83b1ba64
@@ -1908,6 +1908,7 @@ var PaymentScreenWidget = ScreenWidget.extend({
|
||||
}
|
||||
|
||||
order.initialize_validation_date();
|
||||
order.finalized = true;
|
||||
|
||||
if (order.is_to_invoice()) {
|
||||
var invoiced = this.pos.push_and_invoice_order(order);
|
||||
@@ -2010,4 +2011,3 @@ return {
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user