Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search Link Error for Purchase Order #85

Closed
0xD0M1M0 opened this issue Jan 30, 2025 · 0 comments · Fixed by #87
Closed

Search Link Error for Purchase Order #85

0xD0M1M0 opened this issue Jan 30, 2025 · 0 comments · Fixed by #87

Comments

@0xD0M1M0
Copy link

While trying to add a new e-invoice in e-invoice-import and selecting the purchase order of an item in the items table. The following error occurs. There is no purchase order in the system, so the expected result should be a blank list.

App Versions

{
	"erpnext": "15.49.3",
	"erpnext_datev": "15.2.2",
	"erpnext_germany": "15.9.1",
	"eu_einvoice": "15.5.0",
	"frappe": "15.54.0",
	"hrms": "15.38.2",
	"pdf_on_submit": "15.2.2",
	"red_background": "15.0.0"
}

Route

Form/E Invoice Import/u6r195u1qk

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 50, in handle
    data = execute_cmd(cmd)
           ^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1726, 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/search.py", line 47, in search_link
    results = search_widget(
              ^^^^^^^^^^^^^^
  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/desk/search.py", line 94, in search_widget
    return frappe.call(
           ^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1726, 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/__init__.py", line 2484, in wrapper
    return fn(**kwargs)
           ^^^^^^^^^^^^
  File "apps/eu_einvoice/eu_einvoice/european_e_invoice/doctype/e_invoice_import/e_invoice_import.py", line 571, in po_item_query
    purchase_order = filters.pop("parent")
                     ^^^^^^^^^^^^^^^^^^^^^
KeyError: 'parent'

Request Data

{
	"type": "POST",
	"args": {
		"txt": "",
		"doctype": "Purchase Order Item",
		"ignore_user_permissions": 0,
		"reference_doctype": "E Invoice Item",
		"page_length": 10,
		"query": "eu_einvoice.european_e_invoice.doctype.e_invoice_import.e_invoice_import.po_item_query",
		"filters": "{\"item_code\":\"Chair\"}"
	},
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.search.search_link",
	"request_id": null
}

Response Data

{
	"exception": "KeyError: 'parent'",
	"exc_type": "KeyError",
	"_exc_source": "eu_einvoice (app)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant