Escape (') in customer name in authorization control

This commit is contained in:
Anand Doshi 2012-01-11 12:03:47 +05:30
parent 35041607be
commit 385299903d

View File

@ -88,7 +88,7 @@ class DocType(TransactionBase):
if doc_obj:
if doc_obj.doc.doctype == 'Receivable Voucher': customer = doc_obj.doc.customer
else: customer = doc_obj.doc.customer_name
add_cond = " and master_name = '"+cstr(customer)+"'"
add_cond = " and master_name = '"+make_esc("'")(cstr(customer))+"'"
if based_on == 'Itemwise Discount':
if doc_obj:
for t in getlist(doc_obj.doclist, doc_obj.fname):