NEW Payroll Entry (HR)

Hello team,

After many tries, using different employees, I got “No employees for the mentioned criteria” on every try.

Console:

Uncaught (in promise)
responseJSON
exc:“[“Traceback (most recent call last):\n File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 62, in application\n response = frappe.handler.handle()\n File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle\n data = execute_cmd(cmd)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 53, in execute_cmd\n return frappe.call(method, **frappe.form_dict)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 939, in call\n return fn(*args, **newargs)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 81, in runserverobj\n frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py", line 36, in runserverobj\n r = doc.run_method(method)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method\n out = Document.hook(fn)(self, *args, **kwargs)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in composer\n return composed(self, method, *args, **kwargs)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1007, in runner\n add_to_return_value(self, fn(self, *args, **kwargs))\n File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in \n fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)\n File "/home/frappe/frappe-bench/apps/erpnext/erpnext/hr/doctype/payroll_entry/payroll_entry.py", line 59, in fill_employee_details\n frappe.throw(_("No employees for the mentioned criteria"))\n File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 323, in throw\n msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)\n File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 309, in msgprint\n _raise_exception()\n File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 282, in _raise_exception\n raise raise_exception(encode(msg))\nValidationError: No employees for the mentioned criteria\n”]”

_server_messages:“[”{"message": "No employees for the mentioned criteria", "indicator": "red"}“]”

responseText:“{“exc”:”["Traceback (most recent call last):\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/app.py\", line 62, in application\n response = frappe.handler.handle()\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/handler.py\", line 22, in handle\n data = execute_cmd(cmd)\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/handler.py\", line 53, in execute_cmd\n return frappe.call(method, **frappe.form_dict)\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/init.py\", line 939, in call\n return fn(*args, **newargs)\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/handler.py\", line 81, in runserverobj\n frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py\", line 36, in runserverobj\n r = doc.run_method(method)\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py\", line 755, in run_method\n out = Document.hook(fn)(self, *args, **kwargs)\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py\", line 1024, in composer\n return composed(self, method, *args, **kwargs)\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py\", line 1007, in runner\n add_to_return_value(self, fn(self, *args, **kwargs))\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py\", line 749, in \n fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)\n File \"/home/frappe/frappe-bench/apps/erpnext/erpnext/hr/doctype/payroll_entry/payroll_entry.py\", line 59, in fill_employee_details\n frappe.throw(_(\"No employees for the mentioned criteria\"))\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/init.py\", line 323, in throw\n msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/init.py\", line 309, in msgprint\n _raise_exception()\n File \"/home/frappe/frappe-bench/apps/frappe/frappe/init.py\", line 282, in _raise_exception\n raise raise_exception(encode(msg))\nValidationError: No employees for the mentioned criteria\n"]“,”_server_messages":“["{\"message\": \"No employees for the mentioned criteria\", \"indicator\": \"red\"}"]”}"

Failed to load resource: the server responded with a status of 417 (EXPECTATION FAILED)

Any thoughts?

tested in my instance, same error message when creating payroll entry and click get employee details button without maintain the salary structure and assign employee to it, after maintained the salary structure, employee list can not successfully fetched.

Hi @Francisco_Buendia,
Are you able to go ahead and create the salary slips even if there are no employees getting fetched?

Hello Shreya,

My mistake, something was missing at Salary Structure. It’s working perfectly.

Thank you!
Regards.

1 Like