mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-25 17:48:30 +00:00
fix: remove hardcoded doctype in make_return_doc
(cherry picked from commit 45a5c19dd4)
This commit is contained in:
@@ -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):
|
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
|
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(
|
default_warehouse_for_sales_return = frappe.get_cached_value(
|
||||||
"Company", company, "default_warehouse_for_sales_return"
|
"Company", company, "default_warehouse_for_sales_return"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user