From 842d72f7c442cd473c100fc3890c956a4e7ae33c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 17 Jan 2025 16:51:07 +0530 Subject: [PATCH] fix: Ambiguous column error while creating Sales Return (#45275) (cherry picked from commit ec487c14d9a68629c86fe814d9f83eebe9f5f8eb) --- erpnext/controllers/sales_and_purchase_return.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/sales_and_purchase_return.py b/erpnext/controllers/sales_and_purchase_return.py index 5c8f5a6fbd7..88935a6b245 100644 --- a/erpnext/controllers/sales_and_purchase_return.py +++ b/erpnext/controllers/sales_and_purchase_return.py @@ -259,7 +259,7 @@ def get_already_returned_items(doc): ) data = frappe.db.sql( f""" - select {column}, {field} + select {column}, child.{field} from `tab{doc.doctype} Item` child, `tab{doc.doctype}` par where