Customer Portal


Can anyone point me in teh right direction.

What im trying to do is learn more how I can give my customer access to some of their data. I see that we can use the portal and web forms but struggling with some parta. I understand that the features are not full so trying to learn the architecture so I can maybe help with extending.

For starter im getting an error when clicking ‘edit profile’ link on ‘My Account’ page:

Traceback (most recent call last):
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/”, line 32, in render
data = render_page_by_language(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/”, line 101, in render_page_by_language
return render_page(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/”, line 117, in render_page
return build(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/”, line 124, in build
return build_page(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/”, line 137, in build_page
context = get_context(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/”, line 18, in get_context
context = build_context(context)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/”, line 73, in build_context
ret = context.doc.get_context(context)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/doctype/web_form/”, line 122, in get_context
if and not has_web_form_permission(self.doc_type,
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/doctype/web_form/”, line 425, in has_web_form_permission
elif frappe.has_website_permission(name, ptype=ptype):
File “/home/hemant/frappe-bench/apps/frappe/frappe/”, line 505, in has_website_permission
doc = get_doc(doctype, doc)
UnboundLocalError: local variable ‘doctype’ referenced before assignment

I tried to give customer role rights but still does not work, any ideas?


Fixing via [fix] pass kargs doctype in has_website_permission by saurabh6790 · Pull Request #2251 · frappe/frappe · GitHub