You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a Stock Reconciliation to put the stock quantity to zero for old (pre-v15) batched stock, two new Serial and Batch Bundles were created. 1. Outward with negative qty, 2. Inward with positive qty. And no Stock Entry ?
When trying to cancel this Stock Reconciliation I got the error below (No Serial Batch Bundle) because it (presumably) tries to create a Cancel SLE from the old existing SLE which does not link to a Serial Batch Bundle
Relevant log output / Stack trace / Full Error Message.
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 110, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
returnfrappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1715, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/desk/form/save.py", line 57, in cancel
doc.cancel()
File "apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py", line 738, in cancel
self._cancel()
File "apps/frappe/frappe/model/document.py", line 1024, in _cancel
returnself.save()
File "apps/frappe/frappe/model/document.py", line 334, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 386, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1123, in run_post_save_methods
self.run_method("on_cancel")
File "apps/frappe/frappe/model/document.py", line 950, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1316, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1298, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 947, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py", line 114, in on_cancel
self.make_sle_on_cancel()
File "apps/erpnext/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py", line 630, in make_sle_on_cancel
self.make_sl_entries(sl_entries, allow_negative_stock=allow_negative_stock)
File "apps/erpnext/erpnext/controllers/stock_controller.py", line 532, in make_sl_entries
make_sl_entries(sl_entries, allow_negative_stock, via_landed_cost_voucher)
File "apps/erpnext/erpnext/stock/stock_ledger.py", line 85, in make_sl_entries
sle_doc = make_entry(sle, allow_negative_stock, via_landed_cost_voucher)
File "apps/erpnext/erpnext/stock/stock_ledger.py", line 212, in make_entry
sle.submit()
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1038, in submit
returnself._submit()
File "apps/frappe/frappe/model/document.py", line 1019, in _submit
returnself.save()
File "apps/frappe/frappe/model/document.py", line 334, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 356, in _save
returnself.insert()
File "apps/frappe/frappe/model/document.py", line 310, in insert
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1121, in run_post_save_methods
self.run_method("on_submit")
File "apps/frappe/frappe/model/document.py", line 950, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1316, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1298, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 947, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py", line 172, in on_submit
self.validate_serial_batch_no_bundle()
File "apps/erpnext/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py", line 215, in validate_serial_batch_no_bundle
self.throw_error_message(f"Serial No / Batch No are mandatory for Item {self.item_code}")
File "apps/erpnext/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py", line 221, in throw_error_message
frappe.throw(_(message), exception)
File "apps/frappe/frappe/__init__.py", line 603, in throw
msgprint(
File "apps/frappe/frappe/__init__.py", line 575, in msgprint
_raise_exception()
File "apps/frappe/frappe/__init__.py", line 526, in _raise_exception
raise exc
frappe.exceptions.ValidationError: Serial No / Batch No are mandatory for Item 10010626
The text was updated successfully, but these errors were encountered:
Information about bug
Relates to:
#34564
@rohitwaghchaure
Module
stock
Version
ERPNext: v15.6.1 (version-15)
Frappe Framework: v15.5.0 (version-15)
Installation method
None
Relevant log output / Stack trace / Full Error Message.
The text was updated successfully, but these errors were encountered: