Hi All,
Serial No xxxxxxxx has already been received
I could use some help with this error please. I’m trying to receive a few serial numbers in a standard Purchase Receipt, and when the document is submitted, we get the above error. In the Stock Ledger the movement for the serial number is as follows:
- Purchase Receipt (into Stores warehouse)
- Delivery Note (to Customer)
- Delivery Note Return (from Customer into Stores warehouse)
- Stock Entry (to Supplier, for repair)
Now I’m trying to do a Purchase Receipt and the system is telling me I’ve already received it. This has always worked in the past. Our current version is as follows:
ERPNext: v8.11.0
Frappe: v8.10.1
I’ve tried in our dev environment. We don’t get this error and I’m able to receive the item just fine. Those versions are:
ERPNext: v8.0.13
Frappe: v8.0.18.
Older versions, but it works.
The web browser console displays these errors on Submit of DocType:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 741, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 730, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 230, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 280, in _save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 793, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 887, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 660, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py”, line 127, in on_submit
self.update_stock_ledger()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/buying_controller.py”, line 376, in update_stock_ledger
via_landed_cost_voucher=via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py”, line 265, in make_sl_entries
make_sl_entries(sl_entries, is_amended, allow_negative_stock, via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/stock_ledger.py”, line 31, in make_sl_entries
sle_id = make_entry(sle, allow_negative_stock, via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/stock_ledger.py”, line 56, in make_entry
sle.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 741, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 730, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 230, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 280, in _save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 793, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 887, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 660, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py”, line 36, in on_submit
process_serial_no(self)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/serial_no/serial_no.py”, line 186, in process_serial_no
validate_serial_no(sle, item_det)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/serial_no/serial_no.py”, line 218, in validate_serial_no
SerialNoDuplicateError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 319, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
SerialNoDuplicateE31174982rial No xxxxxxxx has already been received
desk.min.js?ver=1504759063.0:1557 Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 923, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 19, in savedocs
doc.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 741, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 730, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 230, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 280, in _save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 793, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 887, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 660, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py”, line 127, in on_submit
self.update_stock_ledger()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/buying_controller.py”, line 376, in update_stock_ledger
via_landed_cost_voucher=via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/controllers/stock_controller.py”, line 265, in make_sl_entries
make_sl_entries(sl_entries, is_amended, allow_negative_stock, via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/stock_ledger.py”, line 31, in make_sl_entries
sle_id = make_entry(sle, allow_negative_stock, via_landed_cost_voucher)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/stock_ledger.py”, line 56, in make_entry
sle.submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 741, in submit
self._submit()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 730, in _submit
self.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 230, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 280, in _save
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 793, in run_post_save_methods
self.run_method(“on_submit”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 887, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 660, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py”, line 36, in on_submit
process_serial_no(self)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/serial_no/serial_no.py”, line 186, in process_serial_no
validate_serial_no(sle, item_det)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/stock/doctype/serial_no/serial_no.py”, line 218, in validate_serial_no
SerialNoDuplicateError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 319, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
SerialNoDuplicateE31174982rial No xxxxxxxx has already been received
I would really appreciate any help on this one. Thanks!!