mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 00:14:50 +00:00
Merge pull request #20331 from 0Pranav/version-12
fix: imporer escaping
This commit is contained in:
@@ -76,7 +76,7 @@ class AuthorizationControl(TransactionBase):
|
|||||||
add_cond = ''
|
add_cond = ''
|
||||||
auth_value = av_dis
|
auth_value = av_dis
|
||||||
|
|
||||||
if val == 1: add_cond += " and system_user = '"+ frappe.db.escape(session['user']) +"'"
|
if val == 1: add_cond += " and system_user = {0}".format(frappe.db.escape(session['user']))
|
||||||
elif val == 2: add_cond += " and system_role IN %s" % ("('"+"','".join(frappe.get_roles())+"')")
|
elif val == 2: add_cond += " and system_role IN %s" % ("('"+"','".join(frappe.get_roles())+"')")
|
||||||
else: add_cond += " and ifnull(system_user,'') = '' and ifnull(system_role,'') = ''"
|
else: add_cond += " and ifnull(system_user,'') = '' and ifnull(system_role,'') = ''"
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ class AuthorizationControl(TransactionBase):
|
|||||||
if doc_obj:
|
if doc_obj:
|
||||||
if doc_obj.doctype == 'Sales Invoice': customer = doc_obj.customer
|
if doc_obj.doctype == 'Sales Invoice': customer = doc_obj.customer
|
||||||
else: customer = doc_obj.customer_name
|
else: customer = doc_obj.customer_name
|
||||||
add_cond = " and master_name = '"+ frappe.db.escape(customer) +"'"
|
add_cond = " and master_name = {0}".format(frappe.db.escape(customer))
|
||||||
if based_on == 'Itemwise Discount':
|
if based_on == 'Itemwise Discount':
|
||||||
if doc_obj:
|
if doc_obj:
|
||||||
for t in doc_obj.get("items"):
|
for t in doc_obj.get("items"):
|
||||||
|
|||||||
Reference in New Issue
Block a user