mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-20 23:35:11 +00:00
fix: validate sabb autocreation when disabled
(cherry picked from commit 3ca1940881)
# Conflicts:
# erpnext/stock/doctype/stock_entry/stock_entry.py
This commit is contained in:
@@ -1135,8 +1135,17 @@ class StockEntry(StockController):
|
||||
"ignore_serial_nos": already_picked_serial_nos,
|
||||
"qty": row.transfer_qty * -1,
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
).update_serial_and_batch_entries()
|
||||
elif not row.serial_and_batch_bundle:
|
||||
=======
|
||||
).update_serial_and_batch_entries(
|
||||
serial_nos=serial_nos.get(row.name), batch_nos=batch_nos.get(row.name)
|
||||
)
|
||||
elif not row.serial_and_batch_bundle and frappe.get_single_value(
|
||||
"Stock Settings", "auto_create_serial_and_batch_bundle_for_outward"
|
||||
):
|
||||
>>>>>>> 3ca1940881 (fix: validate sabb autocreation when disabled)
|
||||
bundle_doc = SerialBatchCreation(
|
||||
{
|
||||
"item_code": row.item_code,
|
||||
|
||||
@@ -259,7 +259,7 @@ class SerialBatchBundle:
|
||||
and not self.sle.serial_and_batch_bundle
|
||||
and self.item_details.has_batch_no == 1
|
||||
and (
|
||||
self.item_details.create_new_batch
|
||||
(self.item_details.create_new_batch and self.sle.actual_qty > 0)
|
||||
or (
|
||||
frappe.db.get_single_value(
|
||||
"Stock Settings", "auto_create_serial_and_batch_bundle_for_outward"
|
||||
|
||||
Reference in New Issue
Block a user