diff --git a/pos_order_to_sale_order_sale_financial_risk/static/src/js/CreateOrderPopup.esm.js b/pos_order_to_sale_order_sale_financial_risk/static/src/js/CreateOrderPopup.esm.js index 02964fc89c..224d179a69 100644 --- a/pos_order_to_sale_order_sale_financial_risk/static/src/js/CreateOrderPopup.esm.js +++ b/pos_order_to_sale_order_sale_financial_risk/static/src/js/CreateOrderPopup.esm.js @@ -41,6 +41,22 @@ export const CreateOrderPopupRisk = (CreateOrderPopup) => return ""; } + /** + * Get Partners field list + * @returns {String[]} + * @private + */ + _getPartnerFields() { + return [ + "risk_exception", + "risk_sale_order_limit", + "risk_sale_order", + "risk_sale_order_include", + "risk_total", + "credit_limit", + ]; + } + /** * Get risk fields values for partner of order * @returns {Promise<*>} partner fields Object @@ -51,17 +67,7 @@ export const CreateOrderPopupRisk = (CreateOrderPopup) => const [partnerRiskValues] = await this.rpc({ model: "res.partner", method: "read", - args: [ - order.partner.id, - [ - "risk_exception", - "risk_sale_order_limit", - "risk_sale_order", - "risk_sale_order_include", - "risk_total", - "credit_limit", - ], - ], + args: [order.partner.id, this._getPartnerFields()], }); return partnerRiskValues; }