fix: check is_rejected attribute

(cherry picked from commit 2ac2e02b2f)
(cherry picked from commit bdf150bdf8)
This commit is contained in:
Kavin
2025-10-06 17:49:28 +05:30
committed by Mergify
parent 161c1fb7a4
commit b017f07343

View File

@@ -1227,7 +1227,7 @@ class SerialBatchCreation:
def create_batch(self):
from erpnext.stock.doctype.batch.batch import make_batch
if self.is_rejected:
if hasattr(self, "is_rejected") and self.is_rejected:
bundle = frappe.db.get_value(
"Serial and Batch Bundle",
{