mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
Merge pull request #50069 from frappe/mergify/bp/version-15-hotfix/pr-50027
fix: reset raw materials considering not available batches (backport #50027)
This commit is contained in:
@@ -637,7 +637,8 @@ class SubcontractingController(StockController):
|
|||||||
|
|
||||||
if use_serial_batch_fields:
|
if use_serial_batch_fields:
|
||||||
rm_obj.use_serial_batch_fields = 1
|
rm_obj.use_serial_batch_fields = 1
|
||||||
self.__set_batch_nos(bom_item, item_row, rm_obj, qty)
|
if not self.flags.get("reset_raw_materials"):
|
||||||
|
self.__set_batch_nos(bom_item, item_row, rm_obj, qty)
|
||||||
|
|
||||||
if self.doctype == "Subcontracting Receipt":
|
if self.doctype == "Subcontracting Receipt":
|
||||||
if not use_serial_batch_fields:
|
if not use_serial_batch_fields:
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ class SubcontractingReceipt(SubcontractingController):
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def reset_raw_materials(self):
|
def reset_raw_materials(self):
|
||||||
self.supplied_items = []
|
self.supplied_items = []
|
||||||
|
self.flags.reset_raw_materials = True
|
||||||
self.create_raw_materials_supplied()
|
self.create_raw_materials_supplied()
|
||||||
|
|
||||||
def validate_closed_subcontracting_order(self):
|
def validate_closed_subcontracting_order(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user