From c66a0f0c38288e0ee519d17ef4418c746f5949d1 Mon Sep 17 00:00:00 2001 From: geomer198 Date: Sun, 3 Sep 2023 00:26:37 +0300 Subject: [PATCH] [FIX] sale_financial_risk_pos_compatibility: action create SO is changed. --- .../static/src/js/CreateOrderPopup.esm.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sale_financial_risk_pos_compatibility/static/src/js/CreateOrderPopup.esm.js b/sale_financial_risk_pos_compatibility/static/src/js/CreateOrderPopup.esm.js index 18f20543cf..1f362dbd44 100644 --- a/sale_financial_risk_pos_compatibility/static/src/js/CreateOrderPopup.esm.js +++ b/sale_financial_risk_pos_compatibility/static/src/js/CreateOrderPopup.esm.js @@ -6,6 +6,16 @@ import framework from "web.framework"; export const CreateOrderPopupRisk = (CreateOrderPopup) => class CreateOrderPopupRisk extends CreateOrderPopup { + async _actionCreateSaleOrder(order_state) { + // Create Sale Order + const result = await this._createSaleOrder(order_state); + if (result !== true) { + return await super._actionCreateSaleOrder(order_state); + } + // Close popup + return await super.confirm(); + } + async _createSaleOrder(order_state) { if (order_state === "draft") { return await super._createSaleOrder(order_state); @@ -59,6 +69,7 @@ export const CreateOrderPopupRisk = (CreateOrderPopup) => order_state ); } + return true; } async _createSaleOrderWithConfirmedError(order, order_state) {