-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Closed
Labels
bugcan't-reproduceWe are unable to reproduce this bug, provide more information.We are unable to reproduce this bug, provide more information.need-more-infoProvide additional context, steps to reproduce this issue.Provide additional context, steps to reproduce this issue.repliedstock
Description
Information about bug
When following the normal creation of a return DN of a serialized item, the return DN can be saved but cannot be submitted. With the following error "No Serial / Batches are available for return"
Occurs only on serialized packed items, direct returns of the same type of item in the "Delivery Note Items" table work as expected.
Module
stock
Version
Frappe Framework: v15.90.1 (rechargehealth-v15)
ERPNext: v15.90.1 (rechargehealth-v15)
Frappe HR: v15.52.4 (rechargehealth-v15)
Installation method
None
Relevant log output / Stack trace / Full Error Message.
Traceback (most recent call last):
File "<ipython-input-6-814f71719ed3>", line 10, in <module>
doc.submit()
File "apps/frappe/frappe/utils/typing_validations.py", line 32, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1097, in submit
return self._submit()
File "apps/frappe/frappe/model/document.py", line 1080, in _submit
return self.save()
File "apps/frappe/frappe/model/document.py", line 378, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 431, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1180, in run_post_save_methods
self.run_method("on_submit")
File "apps/frappe/frappe/model/document.py", line 1011, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1371, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1353, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 1008, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/stock/doctype/delivery_note/delivery_note.py", line 469, in on_submit
self.make_bundle_for_sales_purchase_return(table_name)
File "apps/erpnext/erpnext/controllers/stock_controller.py", line 286, in make_bundle_for_sales_purchase_return
self.make_bundle_for_non_rejected_qty(table_name)
File "apps/erpnext/erpnext/controllers/stock_controller.py", line 350, in make_bundle_for_non_rejected_qty
available_dict = available_serial_batch_for_return(field, child_doctype, reference_ids)
File "apps/erpnext/erpnext/controllers/sales_and_purchase_return.py", line 852, in available_serial_batch_for_return
frappe.throw(_("No Serial / Batches are available for return"))
File "apps/frappe/frappe/__init__.py", line 609, in throw
msgprint(
File "apps/frappe/frappe/__init__.py", line 574, in msgprint
_raise_exception()
File "apps/frappe/frappe/__init__.py", line 525, in _raise_exception
raise exc
frappe.exceptions.ValidationError: No Serial / Batches are available for returnMetadata
Metadata
Assignees
Labels
bugcan't-reproduceWe are unable to reproduce this bug, provide more information.We are unable to reproduce this bug, provide more information.need-more-infoProvide additional context, steps to reproduce this issue.Provide additional context, steps to reproduce this issue.repliedstock