[FIX] point_of_sale: stop showing "select customer" popup twice
Current behavior: When gift card module is activated for a certain PoS, and you use customer account as the payment method without selecting a customer the popup asking you to select a customer would appear 2 times. Steps to reproduce: - Activate gift cards for PoS A - Start session in PoS A - Add some products to the order - Don't set any customer - Go to the payment page - Select "Customer account" as payment method - Click on validate - A popup will appear asking you to select a customer - Click "Ok" - The popup appears again opw-2824675 closes odoo/odoo#91149 X-original-commit: bbb05cd9246b7478bcf1bb580dbe91ba4fb5856c Signed-off-by: Masereel Pierre <pim@odoo.com> Signed-off-by: Engels Robin (roen) <roen@odoo.com>
This commit is contained in:
@@ -31,8 +31,11 @@ export const PosLoyaltyPaymentScreen = (PaymentScreen) =>
|
||||
pointChanges[line.coupon_id] -= line.points_cost;
|
||||
}
|
||||
}
|
||||
if (!await this._isOrderValid(isForceValidate)) {
|
||||
return;
|
||||
}
|
||||
// No need to do an rpc if no existing coupon is being used.
|
||||
if (await this._isOrderValid(isForceValidate) && (!_.isEmpty(pointChanges) || newCodes.length)) {
|
||||
if (!_.isEmpty(pointChanges) || newCodes.length) {
|
||||
try {
|
||||
const {successful, payload} = await this.rpc({
|
||||
model: 'pos.order',
|
||||
|
||||
Reference in New Issue
Block a user