Error in valuation rate

Hello Community!!
i’m getting error as below even though i’m having valuation rate for the specific item.
1.

Make any other transaction for the particular item, then create new material request. And check your console for the reason of this error and raise report on github

@Praveenkumar Okay! thank you for your reply.

@Praveenkumar I created Purchase Order with that item and submitted successfully.
But still facing same issue while creating stock entry for that item.
Anyone can help me?

Open the console log and check the error.

@NCP I’m getting below error!

request.js:473 Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 114, 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
return frappe.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 1768, 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 37, in savedocs
doc.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 1048, in submit
return self._submit()
^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 1031, in _submit
return self.save()
^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 337, in save
return self._save(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 390, in _save
self.run_post_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1131, in run_post_save_methods
self.run_method(“on_submit”)
File “apps/frappe/frappe/model/document.py”, line 962, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 1322, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 1304, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 959, in fn
return method_object(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py”, line 244, in on_submit
self.update_stock_ledger()
File “apps/erpnext/erpnext/stock/doctype/stock_entry/stock_entry.py”, line 1351, in update_stock_ledger
self.make_sl_entries(sl_entries)
File “apps/erpnext/erpnext/controllers/stock_controller.py”, line 869, 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 96, 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 225, 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 1048, in submit
return self._submit()
^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 1031, in _submit
return self.save()
^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 337, in save
return self._save(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 359, in _save
return self.insert()
^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 315, in insert
self.run_post_save_methods()
File “apps/frappe/frappe/model/document.py”, line 1131, in run_post_save_methods
self.run_method(“on_submit”)
File “apps/frappe/frappe/model/document.py”, line 962, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 1322, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 1304, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/model/document.py”, line 959, in fn
return method_object(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/erpnext/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py”, line 184, in on_submit
SerialBatchBundle(
File “apps/erpnext/erpnext/stock/serial_batch_bundle.py”, line 23, in init
self.process_serial_and_batch_bundle()
File “apps/erpnext/erpnext/stock/serial_batch_bundle.py”, line 31, in process_serial_and_batch_bundle
self.process_serial_no()
File “apps/erpnext/erpnext/stock/serial_batch_bundle.py”, line 54, in process_serial_no
self.make_serial_batch_no_bundle()
File “apps/erpnext/erpnext/stock/serial_batch_bundle.py”, line 116, in make_serial_batch_no_bundle
self.set_serial_and_batch_bundle(sn_doc)
File “apps/erpnext/erpnext/stock/serial_batch_bundle.py”, line 194, in set_serial_and_batch_bundle
frappe.db.set_value(self.child_doctype, self.sle.voucher_detail_no, values_to_update)
File “apps/frappe/frappe/database/database.py”, line 994, in set_value
query.run(debug=debug)
File “apps/frappe/frappe/query_builder/utils.py”, line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/database/database.py”, line 234, in sql
self._cursor.execute(query, values)
File “env/lib/python3.11/site-packages/pymysql/cursors.py”, line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File “env/lib/python3.11/site-packages/pymysql/cursors.py”, line 322, in _query
conn.query(q)
File “env/lib/python3.11/site-packages/pymysql/connections.py”, line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “env/lib/python3.11/site-packages/pymysql/connections.py”, line 825, in _read_query_result
result.read()
File “env/lib/python3.11/site-packages/pymysql/connections.py”, line 1199, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “env/lib/python3.11/site-packages/pymysql/connections.py”, line 775, in _read_packet
packet.raise_for_error()
File “env/lib/python3.11/site-packages/pymysql/protocol.py”, line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File “env/lib/python3.11/site-packages/pymysql/err.py”, line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.IntegrityError: (1048, “Column ‘valuation_rate’ cannot be null”)

Check the valuation rate in the row.

@NCP Please check this.

I have the value for that field, but still getting error!

issue is in the serial_and_batch_bundle. you have to debug the code and test it.

we haven’t found the issue in v15 latest version but we will check again.

Okay @NCP Thanks for your help.