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

Unable to view Payslips In PWA #1728

Closed
1 task
shahns opened this issue Apr 30, 2024 · 1 comment · Fixed by #1746
Closed
1 task

Unable to view Payslips In PWA #1728

shahns opened this issue Apr 30, 2024 · 1 comment · Fixed by #1746
Labels
bug Something isn't working

Comments

@shahns
Copy link

shahns commented Apr 30, 2024

Information about bug

I am unable to view payslips in PWA and can see them in desk. This is due to some permission error with Payroll Period DocType.

I have tried to manually grant this permission using permission manager, still it doesn't
work.

image

Module

Payroll

Version

ERPNext: v15.21.2 (version-15)

Frappe Framework: v15.25.0 (version-15)

Frappe HR: v15.20.1 (version-15)

Installation method

docker

Relevant log output / Stack trace / Full Error Message.

19:39:20 web.1      | 192.168.65.1 - - [30/Apr/2024 19:39:20] "GET /hrms/dashboard/salary-slips HTTP/1.1" 200 -
19:39:20 web.1      | 192.168.65.1 - - [30/Apr/2024 19:39:20] "POST /api/method/hrms.api.get_current_employee_info HTTP/1.1" 200 -
19:39:20 web.1      | 192.168.65.1 - - [30/Apr/2024 19:39:20] "POST /api/method/hrms.api.get_current_user_info HTTP/1.1" 200 -
19:39:20 web.1      | 192.168.65.1 - - [30/Apr/2024 19:39:20] "POST /api/method/hrms.api.get_unread_notifications_count HTTP/1.1" 200 -
19:39:20 web.1      | 192.168.65.1 - - [30/Apr/2024 19:39:20] "POST /api/method/hrms.api.are_push_notifications_enabled HTTP/1.1" 200 -
19:39:20 web.1      | 192.168.65.1 - - [30/Apr/2024 19:39:20] "POST /api/method/frappe.client.get_list HTTP/1.1" 200 -
19:39:20 web.1      | Traceback (most recent call last):
19:39:20 web.1      |   File "apps/frappe/frappe/app.py", line 110, in application
19:39:20 web.1      |     response = frappe.api.handle(request)
19:39:20 web.1      |   File "apps/frappe/frappe/api/__init__.py", line 49, in handle
19:39:20 web.1      |     data = endpoint(**arguments)
19:39:20 web.1      |   File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
19:39:20 web.1      |     return frappe.handler.handle()
19:39:20 web.1      |   File "apps/frappe/frappe/handler.py", line 49, in handle
19:39:20 web.1      |     data = execute_cmd(cmd)
19:39:20 web.1      |   File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
19:39:20 web.1      |     return frappe.call(method, **frappe.form_dict)
19:39:20 web.1      |   File "apps/frappe/frappe/__init__.py", line 1761, in call
19:39:20 web.1      |     return fn(*args, **newargs)
19:39:20 web.1      |   File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
19:39:20 web.1      |     return func(*args, **kwargs)
19:39:20 web.1      |   File "apps/frappe/frappe/client.py", line 67, in get_list
19:39:20 web.1      |     return frappe.get_list(**args)
19:39:20 web.1      |   File "apps/frappe/frappe/__init__.py", line 2025, in get_list
19:39:20 web.1      |     return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
19:39:20 web.1      |   File "apps/frappe/frappe/model/db_query.py", line 114, in execute
19:39:20 web.1      |     self.check_read_permission(self.doctype, parent_doctype=parent_doctype)
19:39:20 web.1      |   File "apps/frappe/frappe/model/db_query.py", line 511, in check_read_permission
19:39:20 web.1      |     self._set_permission_map(doctype, parent_doctype)
19:39:20 web.1      |   File "apps/frappe/frappe/model/db_query.py", line 517, in _set_permission_map
19:39:20 web.1      |     frappe.has_permission(
19:39:20 web.1      |   File "apps/frappe/frappe/__init__.py", line 1086, in has_permission
19:39:20 web.1      |     raise frappe.PermissionError
19:39:20 web.1      | frappe.exceptions.PermissionError
19:39:20 web.1      | 
19:39:20 web.1      | 192.168.65.1 - - [30/Apr/2024 19:39:20] "POST /api/method/frappe.client.get_list HTTP/1.1" 403 -
19:39:20 web.1      | 192.168.65.1 - - [30/Apr/2024 19:39:20] "POST /api/method/hrms.api.get_unread_notifications_count HTTP/1.1" 20

Code of Conduct

  • I agree to follow this project's Code of Conduct
@shahns shahns added the bug Something isn't working label Apr 30, 2024
@ruchamahabal
Copy link
Member

ruchamahabal commented May 5, 2024

Can you share the permissions you have set for the employee role on the Payroll Period?
Opened a PR to grant this permission in core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants