agritheory / approvals

Customizable Approval Workflows
Other
5 stars 1 forks source link

fix: allow approvers to view non-role documents #26

Closed Alchez closed 3 months ago

Alchez commented 4 months ago

Closes #21.


Anytime an approver is manually added, the system will also share that document with the approver to ensure they can view/edit the document.

Alchez commented 4 months ago

@agritheory Should an approval rule's condition(s) affect if the user should be able to view the document? Or having a rule for a user or user role is good enough?

Also, I think this change is causing the tests to fail. What do you suggest?

agritheory commented 4 months ago

This override strategy is too specific - requiring a class override per doctype that requires approval is not feasible. We really only want to use the has_permission hook.

agritheory commented 4 months ago

@Alchez New error:

`RecursionError: maximum recursion depth exceeded in comparison` ### App Versions ``` { "approvals": "14.1.0", "check_run": "14.11.5", "erpnext": "14.70.6", "frappe": "14.77.0", "hrms": "14.28.5" } ``` ### Route ``` Form/Item/Payroll Taxes ``` ### Traceback ``` Traceback (most recent call last): File "apps/frappe/frappe/app.py", line 97, in application response = frappe.api.handle() File "apps/frappe/frappe/api.py", line 55, in handle return frappe.handler.handle() File "apps/frappe/frappe/handler.py", line 48, 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 1619, in call return fn(*args, **newargs) File "apps/frappe/frappe/desk/form/load.py", line 39, in getdoc if not doc.has_permission("read"): File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 39, in has_permission return doc.has_permission() File "apps/frappe/frappe/model/document.py", line 214, in has_permission return frappe.permissions.has_permission(self.doctype, permtype, self) File "apps/frappe/frappe/permissions.py", line 65, in inner result = func(*args, **kwargs) File "apps/frappe/frappe/permissions.py", line 129, in has_permission perm = get_doc_permissions(doc, user=user, ptype=ptype).get(ptype) File "apps/frappe/frappe/permissions.py", line 195, in get_doc_permissions if has_controller_permissions(doc, ptype, user=user) is False: File "apps/frappe/frappe/permissions.py", line 390, in has_controller_permissions controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user) File "apps/frappe/frappe/__init__.py", line 1619, in call return fn(*args, **newargs) File "apps/approvals/approvals/approvals/overrides/permissions.py", line 12, in has_permission approval_rules = frappe.get_all( File "apps/frappe/frappe/__init__.py", line 1938, in get_all return get_list(doctype, *args, **kwargs) File "apps/frappe/frappe/__init__.py", line 1910, in get_list return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs) File "apps/frappe/frappe/model/db_query.py", line 190, in execute result = self.build_and_run() File "apps/frappe/frappe/model/db_query.py", line 205, in build_and_run args = self.prepare_args() File "apps/frappe/frappe/model/db_query.py", line 245, in prepare_args self.build_conditions() File "apps/frappe/frappe/model/db_query.py", line 585, in build_conditions self.build_filter_conditions(self.filters, self.conditions) File "apps/frappe/frappe/model/db_query.py", line 606, in build_filter_conditions conditions.append(self.prepare_filter_condition(f)) File "apps/frappe/frappe/model/db_query.py", line 729, in prepare_filter_condition f = get_filter(self.doctype, f, additional_filters_config) File "apps/frappe/frappe/utils/data.py", line 1797, in get_filter sanitize_column(f.fieldname) File "apps/frappe/frappe/utils/data.py", line 1878, in sanitize_column column_name = sqlparse.format(column_name, strip_comments=True, keyword_case="lower") File "env/lib/python3.10/site-packages/sqlparse/__init__.py", line 59, in format return ''.join(stack.run(sql, encoding)) File "env/lib/python3.10/site-packages/sqlparse/engine/filter_stack.py", line 39, in run stmt = grouping.group(stmt) File "env/lib/python3.10/site-packages/sqlparse/engine/grouping.py", line 450, in group func(stmt) File "env/lib/python3.10/site-packages/sqlparse/utils.py", line 74, in wrapped_f f(tlist) File "env/lib/python3.10/site-packages/sqlparse/engine/grouping.py", line 314, in group_comments tidx, token = tlist.token_next_by(t=T.Comment) File "env/lib/python3.10/site-packages/sqlparse/sql.py", line 270, in token_next_by return self._token_matching(lambda tk: imt(tk, i, m, t), idx, end) File "env/lib/python3.10/site-packages/sqlparse/sql.py", line 249, in _token_matching if func(token): File "env/lib/python3.10/site-packages/sqlparse/sql.py", line 270, in return self._token_matching(lambda tk: imt(tk, i, m, t), idx, end) File "env/lib/python3.10/site-packages/sqlparse/utils.py", line 103, in imt elif token.ttype in t: File "env/lib/python3.10/site-packages/sqlparse/tokens.py", line 19, in __contains__ return item is not None and (self is item or item[:len(self)] == self) RecursionError: maximum recursion depth exceeded in comparison ``` ### Request Data ``` { "type": "GET", "args": { "doctype": "Item", "name": "Payroll Taxes" }, "headers": {}, "error_handlers": {}, "url": "/api/method/frappe.desk.form.load.getdoc" } ``` ### Response Data ``` { "exception": "RecursionError: maximum recursion depth exceeded in comparison" } ```
Alchez commented 4 months ago

@agritheory Okay, so I tested it out locally and I spoke with Revant as well about the double APIs, and here's what I've found:

fproldan commented 4 months ago

@agritheory

About the "Page" issue.

I've found where the root cause might be: router.js

The DocType has to be in frappe.boot.user.can_read for the router to display it as FormView

Even adding manually in the code for testing purposes I got stuck here

00:17:50 web.1      | Traceback (most recent call last):
00:17:50 web.1      |   File "apps/frappe/frappe/app.py", line 95, in application
00:17:50 web.1      |     response = frappe.api.handle()
00:17:50 web.1      |                ^^^^^^^^^^^^^^^^^^^
00:17:50 web.1      |   File "apps/frappe/frappe/api.py", line 55, in handle
00:17:50 web.1      |     return frappe.handler.handle()
00:17:50 web.1      |            ^^^^^^^^^^^^^^^^^^^^^^^
00:17:50 web.1      |   File "apps/frappe/frappe/handler.py", line 48, in handle
00:17:50 web.1      |     data = execute_cmd(cmd)
00:17:50 web.1      |            ^^^^^^^^^^^^^^^^
00:17:50 web.1      |   File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
00:17:50 web.1      |     return frappe.call(method, **frappe.form_dict)
00:17:50 web.1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
00:17:50 web.1      |   File "apps/frappe/frappe/__init__.py", line 1611, in call
00:17:50 web.1      |     return fn(*args, **newargs)
00:17:50 web.1      |            ^^^^^^^^^^^^^^^^^^^^
00:17:50 web.1      |   File "apps/frappe/frappe/desk/form/load.py", line 43, in getdoc
00:17:50 web.1      |     raise frappe.PermissionError(("read", doctype, name))
00:17:50 web.1      | frappe.exceptions.PermissionError: ('read', 'Purchase Invoice', 'ACC-PINV-2024-00011')
Alchez commented 4 months ago

@agritheory @fproldan

I can confirm the error with the changes that Francisco suggested.

It seems like the permission hook is simply a filter in the calculation of permissions. Having our hook return truthy doesn't imply read-access; it's more of an additional check. The actual permission matrix is still generated based on the set permissions in Frappe.

I think we have (atleast) two possibilities here:

PS: In both the above solutions, I got permission errors for different doctypes while trying to load a Purchase Invoice (frappe.exceptions.PermissionError: No permission for Buying Settings). Although the actual document did eventually load up for me.

Example use of the second approach:

cache_key = ("Purchase Invoice", "sam@cfc.com", False)  # the last element is for whether the user created the document
frappe.local.role_permissions[cache_key] = {
    "read": True,
    "write": True,
    "create": False,
    "delete": False,
    "submit": False,
    "cancel": False,
    "amend": False,
}
Alchez commented 4 months ago

@agritheory I've added the docshare feature for approvals in two places:

Is there another scenario that I might be missing?

Might be related, but the tests seem to be failing while checking for ToDos. I'm not sure what could be causing it and I think that also means the share feature might not be working for new documents. Can you have a look?


PS: I've removed the previous has_permission controller hook implementation since the docshare feature seems sufficient for this use-case.