Skip to content

Commit

Permalink
fix: set from_warehouse and to_warehouse while mapping SE
Browse files Browse the repository at this point in the history
(cherry picked from commit c09a61f)
  • Loading branch information
s-aga-r authored and mergify[bot] committed Feb 27, 2023
1 parent 4d92d46 commit 80e23d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions erpnext/stock/doctype/material_request/material_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 80e23d0

Please sign in to comment.