fix: deletion of auto-created batch (#20953)

This commit is contained in:
Nabin Hait
2020-03-16 17:26:02 +05:30
committed by GitHub
parent 11fb93d022
commit 5c760175d1

View File

@@ -239,7 +239,7 @@ class StockController(AccountsController):
for d in self.items:
if not d.batch_no: continue
serial_nos = [d.name for d in frappe.get_all("Serial No", {'batch_no': d.batch_no})]
serial_nos = [sr.name for sr in frappe.get_all("Serial No", {'batch_no': d.batch_no})]
if serial_nos:
frappe.db.set_value("Serial No", { 'name': ['in', serial_nos] }, "batch_no", None)