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

Default User for Project is not settable #44311

Open
vogt31337 opened this issue Nov 24, 2024 · 0 comments
Open

Default User for Project is not settable #44311

vogt31337 opened this issue Nov 24, 2024 · 0 comments
Labels

Comments

@vogt31337
Copy link

Information about bug

When performing timetracking for a project, you add time sheets. But a user which has the role "project user" is not able to set himself as an employee in the timesheets for himself. It throws an error, that the user has no access to the employee doctype.

Module

projects

Version

erpnext 15.43.3
frappe 15.48.0
hrms 16.0.0-dev
nl_attendance_timesheet 0.0.1

Installation method

docker

Relevant log output / Stack trace / Full Error Message.

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 1725, 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 193, in search_widget
    values = frappe.get_list(
             ^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 1989, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/db_query.py", line 114, in execute
    self.check_read_permission(self.doctype, parent_doctype=parent_doctype)
  File "apps/frappe/frappe/model/db_query.py", line 511, in check_read_permission
    self._set_permission_map(doctype, parent_doctype)
  File "apps/frappe/frappe/model/db_query.py", line 517, in _set_permission_map
    frappe.has_permission(
  File "apps/frappe/frappe/__init__.py", line 1047, in has_permission
    raise frappe.PermissionError
frappe.exceptions.PermissionError
2 request.js:473:14
@vogt31337 vogt31337 added the bug label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant