mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-20 07:22:13 +00:00
fix: local var referenced before assignment (#41780)
(cherry picked from commit 4ff3e6caaa)
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
This commit is contained in:
@@ -902,12 +902,12 @@ def get_mapped_subcontracting_order(source_name, target_doc=None):
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_doc.populate_items_table()
|
target_doc.populate_items_table()
|
||||||
|
source_doc = frappe.get_doc("Purchase Order", source_name)
|
||||||
|
|
||||||
if target_doc.set_warehouse:
|
if target_doc.set_warehouse:
|
||||||
for item in target_doc.items:
|
for item in target_doc.items:
|
||||||
item.warehouse = target_doc.set_warehouse
|
item.warehouse = target_doc.set_warehouse
|
||||||
else:
|
else:
|
||||||
source_doc = frappe.get_doc("Purchase Order", source_name)
|
|
||||||
if source_doc.set_warehouse:
|
if source_doc.set_warehouse:
|
||||||
for item in target_doc.items:
|
for item in target_doc.items:
|
||||||
item.warehouse = source_doc.set_warehouse
|
item.warehouse = source_doc.set_warehouse
|
||||||
|
|||||||
Reference in New Issue
Block a user