Closed 8848swa closed 2 months ago
Issue is resolved PR -33
@shubham-DT same issue occurring if fetching data without "Fetch exploded BOM (including sub-assemblies)" checked
{
"erpnext": "15.34.0",
"frappe": "15.41.0",
"payments": "0.0.1"
}
Form/Material Request/MAT-MR-2024-00004
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/manufacturing/doctype/bom/bom.py", line 1204, in get_bom_items
items = get_bom_items_as_dict(bom, company, qty, fetch_exploded, include_non_stock_items=True).values()
File "apps/erpnext/erpnext/manufacturing/doctype/bom/bom.py", line 1181, in get_bom_items_as_dict
items = frappe.db.sql(query, {"qty": qty, "bom": bom, "company": company}, as_dict=True)
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.UndefinedColumn: column "bom_item_idx" does not exist
LINE 48: bom_item_idx
^
{
"type": "POST",
"args": {
"bom": "BOM-_Test FG Item 2-001",
"warehouse": "_Test Rejected Warehouse - _TC",
"qty": 1,
"fetch_exploded": 0,
"company": "8848 Digital"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/erpnext.manufacturing.doctype.bom.bom.get_bom_items",
"request_id": null
}
{
"exception": "",
"exc_type": "UndefinedColumn",
"_exc_source": "erpnext (app)",
"_debug_messages": "[\"Error in query:\\ncolumn \\\"bom_item_idx\\\" does not exist\\nLINE 48: bom_item_idx\\n ^\\n\"]"
}
fixed the issue of creation MR from BOM when fetch_explode_bom is unchecked PR - 45
Resolved, Hence closing...
Information about bug
While new material request creation through fetch Items from Bill of Materials getting an error
Module
stock
Version
ERPNext: v15.34.0 (version-15)
Frappe Framework: v15.41.0 (version-15)
Payments: v0.0.1 (version-15)
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
Route
Traceback
Request Data
Response Data