ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

How to give the display depends on based to role


#1

I am using this eval:frappe.user.has_role(‘QA Manager’) && doc.pending_qa_approval == 1
but its not working
help me out


#2

You can restrict via Perm level in the docfields.

Then allow only QA Manager role to read and write on that perm level.


#3

its not working


#4

Use this below method to display depends on based on role
eval:frappe.user.has_role(“System Manager”)


#5

Are you sure we have access to frappe object in eval of depends on? I have only tried doc object untill now.

By the way… the better way to do is via field level permissions as suggested by @root13F.


#6

Hello, @arokia
You should give @root13F 's suggestion a shot. Check out this link