fix: Reset Raw Materials Table button not working

(cherry picked from commit 128e243945)
This commit is contained in:
Rohit Waghchaure
2025-10-08 21:46:17 +05:30
committed by Mergify
parent 5d9c245ddd
commit 81ed32ff51
3 changed files with 13 additions and 1 deletions

View File

@@ -201,6 +201,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
@@ -651,6 +654,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