mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-16 03:03:50 +00:00
fix: sanitize column name for inventory_dimensions in get_stock_balance
(cherry picked from commit eb22794f14)
This commit is contained in:
@@ -129,8 +129,9 @@ def get_stock_balance(
|
||||
extra_cond = ""
|
||||
if inventory_dimensions_dict:
|
||||
for field, value in inventory_dimensions_dict.items():
|
||||
column = frappe.utils.sanitize_column(field)
|
||||
args[field] = value
|
||||
extra_cond += f" and {field} = %({field})s"
|
||||
extra_cond += f" and {column} = %({field})s"
|
||||
|
||||
last_entry = get_previous_sle(args, extra_cond=extra_cond)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user