mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
add select type link fields in permission control
This commit is contained in:
@@ -70,7 +70,10 @@ class DocType:
|
|||||||
ret.append(p)
|
ret.append(p)
|
||||||
|
|
||||||
# fields list
|
# fields list
|
||||||
fl = ['', 'owner'] + [l[0] for l in sql("select fieldname from tabDocField where parent=%s and fieldtype='Link' and ifnull(options,'')!=''", doctype)]
|
fl = ['', 'owner'] + [l[0] for l in sql("""\
|
||||||
|
select fieldname from tabDocField where parent=%s
|
||||||
|
and ((fieldtype='Link' and ifnull(options,'')!='') or
|
||||||
|
(fieldtype='Select') and lcase(ifnull(options,'')) like 'link:%%')""", doctype)]
|
||||||
|
|
||||||
return {'perms':ret, 'fields':fl}
|
return {'perms':ret, 'fields':fl}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user