fix: remove hardcoded doctype in make_return_doc

(cherry picked from commit 45a5c19dd4)
This commit is contained in:
barredterra
2025-05-19 15:40:57 +02:00
committed by Mergify
parent 35c7af1b9d
commit 1a69d8137f

View File

@@ -342,7 +342,7 @@ def get_returned_qty_map_for_row(return_against, party, row_name, doctype):
def make_return_doc(doctype: str, source_name: str, target_doc=None, return_against_rejected_qty=False):
from frappe.model.mapper import get_mapped_doc
company = frappe.db.get_value("Delivery Note", source_name, "company")
company = frappe.db.get_value(doctype, source_name, "company")
default_warehouse_for_sales_return = frappe.get_cached_value(
"Company", company, "default_warehouse_for_sales_return"
)