mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-14 17:33:09 +00:00
refactor: split stock_entry.py into multiple files for better readability
This commit is contained in:
@@ -378,7 +378,7 @@ class SubcontractingInwardOrder(SubcontractingController):
|
||||
}
|
||||
}
|
||||
|
||||
stock_entry.add_to_stock_entry_detail(items_dict)
|
||||
stock_entry.append("items", items_dict[rm_item.get("rm_item_code")])
|
||||
|
||||
if target_doc:
|
||||
return stock_entry
|
||||
@@ -419,7 +419,7 @@ class SubcontractingInwardOrder(SubcontractingController):
|
||||
}
|
||||
}
|
||||
|
||||
stock_entry.add_to_stock_entry_detail(items_dict)
|
||||
stock_entry.append("items", items_dict[rm_item.get("rm_item_code")])
|
||||
|
||||
if target_doc:
|
||||
return stock_entry
|
||||
@@ -472,7 +472,7 @@ class SubcontractingInwardOrder(SubcontractingController):
|
||||
}
|
||||
}
|
||||
|
||||
stock_entry.add_to_stock_entry_detail(items_dict)
|
||||
stock_entry.append("items", items_dict[fg_item.item_code])
|
||||
|
||||
if (
|
||||
frappe.get_single_value("Selling Settings", "deliver_secondary_items")
|
||||
@@ -497,7 +497,7 @@ class SubcontractingInwardOrder(SubcontractingController):
|
||||
}
|
||||
}
|
||||
|
||||
stock_entry.add_to_stock_entry_detail(items_dict)
|
||||
stock_entry.append("items", items_dict[secondary_item.item_code])
|
||||
|
||||
if target_doc:
|
||||
return stock_entry
|
||||
@@ -542,7 +542,7 @@ class SubcontractingInwardOrder(SubcontractingController):
|
||||
}
|
||||
}
|
||||
|
||||
stock_entry.add_to_stock_entry_detail(items_dict)
|
||||
stock_entry.append("items", items_dict[fg_item.item_code])
|
||||
|
||||
if target_doc:
|
||||
return stock_entry
|
||||
|
||||
@@ -240,6 +240,7 @@ class IntegrationTestSubcontractingInwardOrder(ERPNextTestSuite):
|
||||
delivery = frappe.new_doc("Stock Entry").update(scio.make_subcontracting_delivery())
|
||||
delivery.items[0].use_serial_batch_fields = 1
|
||||
delivery.save()
|
||||
delivery.submit()
|
||||
delivery_serial_list, _ = get_serial_batch_list_from_item(delivery.items[0])
|
||||
self.assertEqual(sorted(serial_list), sorted(delivery_serial_list))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user