Customer Portal

Hi,

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/render.py”, line 32, in render
data = render_page_by_language(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/render.py”, line 101, in render_page_by_language
return render_page(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/render.py”, line 117, in render_page
return build(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/render.py”, line 124, in build
return build_page(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/render.py”, line 137, in build_page
context = get_context(path)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/context.py”, line 18, in get_context
context = build_context(context)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/context.py”, line 73, in build_context
ret = context.doc.get_context(context)
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/doctype/web_form/web_form.py”, line 122, in get_context
if frappe.form_dict.name and not has_web_form_permission(self.doc_type, frappe.form_dict.name):
File “/home/hemant/frappe-bench/apps/frappe/frappe/website/doctype/web_form/web_form.py”, line 425, in has_web_form_permission
elif frappe.has_website_permission(name, ptype=ptype):
File “/home/hemant/frappe-bench/apps/frappe/frappe/init.py”, 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?

regards
Hemant

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