Skip to content

Commit

Permalink
[FIX] sale_financial_risk_pos_compatibility: action create SO is chan…
Browse files Browse the repository at this point in the history
…ged.
  • Loading branch information
geomer198 committed Sep 2, 2023
1 parent bc18518 commit c66a0f0
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -59,6 +69,7 @@ export const CreateOrderPopupRisk = (CreateOrderPopup) =>
order_state
);
}
return true;
}

async _createSaleOrderWithConfirmedError(order, order_state) {
Expand Down

0 comments on commit c66a0f0

Please sign in to comment.