8848digital / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
0 stars 0 forks source link

Tree view throwing error #44

Open aasif-patel opened 1 day ago

aasif-patel commented 1 day ago

Information about bug

image

This error is encountered while accessing the doctype tree view

  1. Company
  2. Chart of Accounts (Account)
  3. Task
  4. Cost center
  5. Employee
  6. Location

May be more doctype, please check other also

App Versions

{
    "erpnext": "15.34.0",
    "frappe": "15.41.0",
    "payments": "0.0.1"
}

Route

Tree/Company

Traceback

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/erpnext/erpnext/setup/doctype/company/company.py", line 787, in get_children
    return 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: zero-length delimited identifier at or near """"
LINE 7:    coalesce(parent_company, "")=''
                                    ^

Request Data

{
    "type": "POST",
    "args": {
        "doctype": "Company",
        "parent": "All Companies",
        "is_root": true
    },
    "headers": {},
    "error_handlers": {},
    "url": "/api/method/erpnext.setup.doctype.company.company.get_children",
    "request_id": null
}This error is encountered while accessing the doctype tree view

Response Data

{
    "exception": "",
    "exc_type": "SyntaxError",
    "_exc_source": "erpnext (app)",
    "_debug_messages": "[\"Syntax error in query:\\nselect\\n\\t\\t\\tname as value,\\n\\t\\t\\tis_group as expandable\\n\\t\\tfrom\\n\\t\\t\\t\\\"tabCompany\\\" comp\\n\\t\\twhere\\n\\t\\t\\tcoalesce(parent_company, \\\"\\\")='' \"]"
}

Module

accounts, stock, projects, other

Version

Frappe v15 ERPNext v15

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

No response

8848swa commented 1 day ago

Sales Person Tree View same error image