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 1775, 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 39, in savedocs
doc.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 291, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1091, in run_before_save_methods
self.run_method("validate")
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/accounts/doctype/sales_invoice/sales_invoice.py", line 265, in validate
super().validate()
File "apps/erpnext/erpnext/controllers/selling_controller.py", line 29, in validate
super().validate()
File "apps/erpnext/erpnext/controllers/stock_controller.py", line 52, in validate
super().validate()
File "apps/erpnext/erpnext/controllers/accounts_controller.py", line 194, in validate
self.set_incoming_rate()
File "apps/erpnext/erpnext/controllers/selling_controller.py", line 457, in set_incoming_rate
d.incoming_rate = get_incoming_rate(
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/erpnext/erpnext/stock/utils.py", line 311, in get_incoming_rate
in_rate = get_valuation_rate(
File "apps/erpnext/erpnext/stock/stock_ledger.py", line 1747, in get_valuation_rate
if last_valuation_rate := frappe.db.sql(
File "apps/frappe/frappe/database/postgres/database.py", line 218, in sql
return super().sql(modify_query(query), modify_values(values), *args, **kwargs)
File "apps/frappe/frappe/database/database.py", line 227, in sql
self._cursor.execute(query, values)
psycopg2.errors.SyntaxError: syntax error at or near "index"
LINE 2: from "tabStock Ledger Entry" force index (item_warehouse)
^
Information about bug
App Versions
Route
Traceback
Request Data
Response Data
Module
accounts
Version
ERPNext v15 Frappe V15
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
No response