Inventory Dimension: When the user saves a new Inventory Dimension record, an error is thrown.
psycopg2.errors.InvalidColumnReference: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 5: order by "tabDocField"."modified" ASC
^
Module
stock
Version
ERPNext: v15.34.0 (version-15)
Frappe Framework: v15.40.0 (version-15)
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
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 315, in insert
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1128, in run_post_save_methods
self.run_method("on_update")
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/inventory_dimension/inventory_dimension.py", line 148, in on_update
self.add_custom_fields()
File "apps/erpnext/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py", line 199, in add_custom_fields
for doctype in get_inventory_documents():
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/erpnext/erpnext/stock/doctype/inventory_dimension/inventory_dimension.py", line 293, in get_inventory_documents
return frappe.get_all(
File "apps/frappe/frappe/__init__.py", line 2064, in get_all
return get_list(doctype, *args, **kwargs)
File "apps/frappe/frappe/__init__.py", line 2039, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
File "apps/frappe/frappe/model/db_query.py", line 191, in execute
result = self.build_and_run()
File "apps/frappe/frappe/model/db_query.py", line 232, in build_and_run
return frappe.db.sql(
File "apps/frappe/frappe/database/postgres/database.py", line 219, in sql
return super().sql(modify_query(query), modify_values(values), *args, **kwargs)
File "apps/frappe/frappe/database/database.py", line 229, in sql
self._cursor.execute(query, values)
psycopg2.errors.InvalidColumnReference: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 5: order by "tabDocField"."modified" ASC
^
{
"exception": "",
"exc_type": "InvalidColumnReference",
"_exc_source": "erpnext (app)",
"_debug_messages": "[\"Error in query:\\nfor SELECT DISTINCT, ORDER BY expressions must appear in select list\\nLINE 5: order by \\\"tabDocField\\\".\\\"modified\\\" ASC\\n ^\\n\"]"
}
Information about bug
Inventory Dimension: When the user saves a new Inventory Dimension record, an error is thrown. psycopg2.errors.InvalidColumnReference: for SELECT DISTINCT, ORDER BY expressions must appear in select list LINE 5: order by "tabDocField"."modified" ASC ^
Module
stock
Version
ERPNext: v15.34.0 (version-15)
Frappe Framework: v15.40.0 (version-15)
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
Route
Traceback
Request Data
Response Data