fix: Reset Raw Materials Table button not working

This commit is contained in:
Rohit Waghchaure
2025-10-08 21:46:17 +05:30
parent b2da214346
commit 128e243945
3 changed files with 14 additions and 2 deletions

View File

@@ -202,6 +202,9 @@ class SubcontractingController(StockController):
self.set(self.raw_material_table, [])
return
if not self.get(self.raw_material_table):
return
item_dict = self.__get_data_before_save()
if not item_dict:
return True
@@ -657,6 +660,9 @@ class SubcontractingController(StockController):
from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos_for_outward
from erpnext.stock.get_item_details import get_filtered_serial_nos
if self.is_return:
return
for row in self.supplied_items:
item_details = frappe.get_cached_value(
"Item", row.rm_item_code, ["has_batch_no", "has_serial_no"], as_dict=1