Error fixed in auth control
This commit is contained in:
parent
c8d5625763
commit
525887fd8a
@ -128,7 +128,13 @@ class DocType(TransactionBase):
|
|||||||
# Specific Role
|
# Specific Role
|
||||||
# ===============
|
# ===============
|
||||||
# Check for authorization set on particular roles
|
# Check for authorization set on particular roles
|
||||||
based_on = [x[0] for x in sql("select based_on from `tabAuthorization Rule` where transaction = %s and system_role IN (%s) and based_on IN (%s) and (company = %s or ifnull(company,'')='') and docstatus != 2", (doctype_name, "'"+"','".join(webnotes.user.get_roles())+"'", "'"+"','".join(final_based_on)+"'",company))]
|
based_on = [x[0] for x in sql("""select based_on
|
||||||
|
from `tabAuthorization Rule`
|
||||||
|
where transaction = %s and system_role IN (%s) and based_on IN (%s)
|
||||||
|
and (company = %s or ifnull(company,'')='')
|
||||||
|
and docstatus != 2
|
||||||
|
""" % ('%s', "'"+"','".join(webnotes.user.get_roles())+"'", "'"+"','".join(final_based_on)+"'", '%s'), (doctype_name, company))]
|
||||||
|
|
||||||
for d in based_on:
|
for d in based_on:
|
||||||
self.bifurcate_based_on_type(doctype_name, total, av_dis, d, doc_obj, 2, company)
|
self.bifurcate_based_on_type(doctype_name, total, av_dis, d, doc_obj, 2, company)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user