From 8dd05ca0563080bef26c60927ec8806c3da92399 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Wed, 24 Jun 2026 20:37:34 +0530 Subject: [PATCH] refactor: parse native JSON request args in selling/page/point_of_sale/point_of_sale.py Use frappe.parse_json instead of json.loads so the whitelisted endpoints accept native JSON types (list/dict/bool) in addition to JSON strings. --- erpnext/selling/page/point_of_sale/point_of_sale.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py index 83e7bac3fef..a96fc309687 100644 --- a/erpnext/selling/page/point_of_sale/point_of_sale.py +++ b/erpnext/selling/page/point_of_sale/point_of_sale.py @@ -347,8 +347,8 @@ def check_opening_entry(user: str): @frappe.whitelist() -def create_opening_voucher(pos_profile: str, company: str, balance_details: str): - balance_details = json.loads(balance_details) +def create_opening_voucher(pos_profile: str, company: str, balance_details: str | list): + balance_details = frappe.parse_json(balance_details) new_pos_opening = frappe.get_doc( {