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.
This commit is contained in:
Mihir Kandoi
2026-06-24 20:37:34 +05:30
parent f4df5ee0bc
commit 8dd05ca056

View File

@@ -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(
{