V9 POS error "Not permitted", How can I determine what error?

An error occurred when I got permission for the salesperson (unselect Accounts Manager).

Uncaught (in promise) TypeError: Cannot read property 'getBoundingClientRect' of null
at m._setMeasurements (libs.min.js?ver=1507542294.0:sourcemap:12)
at new m (libs.min.js?ver=1507542294.0:sourcemap:12)
at Class.init (list.min.js?ver=1507542294.0:1153)
at new Class (desk.min.js?ver=1507542294.0:37)
at Class.make_tags (form.min.js?ver=1507542294.0:4526)
at Class.make (form.min.js?ver=1507542294.0:4470)
at _f.Frm.render_form (form.min.js?ver=1507542294.0:499)
at form.min.js?ver=1507542294.0:591
at <anonymous>

_

Uncaught (in promise) TypeError: Cannot read property 'getBoundingClientRect' of null
at m._setMeasurements (libs.min.js?ver=1507542294.0:sourcemap:12)
at new m (libs.min.js?ver=1507542294.0:sourcemap:12)
at Class.init (list.min.js?ver=1507542294.0:1153)
at new Class (desk.min.js?ver=1507542294.0:37)
at Class.make_tags (form.min.js?ver=1507542294.0:4526)
at Class.make (form.min.js?ver=1507542294.0:4470)
at _f.Frm.render_form (form.min.js?ver=1507542294.0:499)
at _f.Frm.refresh (form.min.js?ver=1507542294.0:454)
at erpnext.min.js?ver=1507542294.0:666
at <anonymous>

_

Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 57, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 923, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/client.py", line 60, in get_value
frappe.throw(_("Not permitted"), frappe.PermissionError)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 319, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red')
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 309, in msgprint
_raise_exception()
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 282, in _raise_exception
raise raise_exception(encode(msg))
PermissionError: Not permitted

Hi @nguyenrom

Kindly check accounts user has role permission to read doctype POS Settings.
Check below link to know more about role based permissions.
https://erpnext.org/docs/user/manual/en/setting-up/users-and-permissions/role-based-permissions

Hi @rohit_w, I have selected “Apply User Permissions” and apply the rule “If POS Settings is permitted” but when I reloaded role page, It didn’t save - https://www.useloom.com/share/605c5167f8e04674aa21bd6cdcc33bf0

I have a question: The role “Accounts User” always say “Not permitted” if I uncheck “Accounts Manager” b/c I have re-installed, but the error still there!

Thanks @rohit_w so much!

Hi @nguyenrom

Please check default role permissions of POS Settings for Accounts User

1 Like

Dear @rohit_w, I have checked, It’s the same!

P/s: I have re-installed ERPNext, the error still there. So it’s the bugs?

In my case I have selected the following roles,

  • Report manager
  • Sales master
  • Sales manager
  • Stock user
  • Sales user
  • Accounts user

And the user works… Of course one or two roles must be removed (master) or create another role with almost the same roles required for POS.

1 Like

Hi @Helio_Jesus, I set permission for salesman, so " __ manager" role is risk?

Hi, I do agree but do as a test to see if eliminates the error… Right now I have just removed the Manager role leaving only report manager and managed to POS with no errors.

Hi @Helio_Jesus

I tried to select all permission ( except “Accounts Manager” ) >> The POS still “Not Permitted” :poorme:

Hi @rohit_w

I have question, How can I determine what error/permission when the ERPNext only said “Not Permitted”

Thank you so much!

Hi @nguyenrom

Kindly give permission of accounts settings to accounts user and check.