mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
Merge pull request #50606 from frappe/mergify/bp/version-15-hotfix/pr-50486
fix: validate sabb autocreation when disabled (backport #50486)
This commit is contained in:
@@ -1136,7 +1136,9 @@ class StockEntry(StockController):
|
|||||||
"qty": row.transfer_qty * -1,
|
"qty": row.transfer_qty * -1,
|
||||||
}
|
}
|
||||||
).update_serial_and_batch_entries()
|
).update_serial_and_batch_entries()
|
||||||
elif not row.serial_and_batch_bundle:
|
elif not row.serial_and_batch_bundle and frappe.get_single_value(
|
||||||
|
"Stock Settings", "auto_create_serial_and_batch_bundle_for_outward"
|
||||||
|
):
|
||||||
bundle_doc = SerialBatchCreation(
|
bundle_doc = SerialBatchCreation(
|
||||||
{
|
{
|
||||||
"item_code": row.item_code,
|
"item_code": row.item_code,
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ class SerialBatchBundle:
|
|||||||
and not self.sle.serial_and_batch_bundle
|
and not self.sle.serial_and_batch_bundle
|
||||||
and self.item_details.has_batch_no == 1
|
and self.item_details.has_batch_no == 1
|
||||||
and (
|
and (
|
||||||
self.item_details.create_new_batch
|
(self.item_details.create_new_batch and self.sle.actual_qty > 0)
|
||||||
or (
|
or (
|
||||||
frappe.db.get_single_value(
|
frappe.db.get_single_value(
|
||||||
"Stock Settings", "auto_create_serial_and_batch_bundle_for_outward"
|
"Stock Settings", "auto_create_serial_and_batch_bundle_for_outward"
|
||||||
|
|||||||
Reference in New Issue
Block a user