From 80e23d035e388d9790ace84a740df948296cf7e1 Mon Sep 17 00:00:00 2001 From: s-aga-r Date: Thu, 23 Feb 2023 12:26:19 +0530 Subject: [PATCH] fix: set `from_warehouse` and `to_warehouse` while mapping SE (cherry picked from commit c09a61f360bad2faa12ac1118665d71203061361) --- erpnext/stock/doctype/material_request/material_request.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py index 1fe2ee5504c6..bcf6dd79d8de 100644 --- a/erpnext/stock/doctype/material_request/material_request.py +++ b/erpnext/stock/doctype/material_request/material_request.py @@ -590,6 +590,9 @@ def update_item(obj, target, source_parent): def set_missing_values(source, target): target.purpose = source.material_request_type + target.from_warehouse = source.set_from_warehouse + target.to_warehouse = source.set_warehouse + if source.job_card: target.purpose = "Material Transfer for Manufacture" @@ -725,6 +728,7 @@ def create_pick_list(source_name, target_doc=None): def make_in_transit_stock_entry(source_name, in_transit_warehouse): ste_doc = make_stock_entry(source_name) ste_doc.add_to_transit = 1 + ste_doc.to_warehouse = in_transit_warehouse for row in ste_doc.items: row.t_warehouse = in_transit_warehouse