[Enhancement] Supplier quotation added on supplier portal

This commit is contained in:
Rohit Waghchaure
2016-09-21 16:49:58 +05:30
parent 0be6073f10
commit 21499e820d
6 changed files with 35 additions and 6 deletions

View File

@@ -25,7 +25,10 @@ def get_transaction_list(doctype, txt=None, filters=None, limit_start=0, limit_p
if not filters: filters = []
filters.append((doctype, "docstatus", "=", 1))
if doctype == 'Supplier Quotation':
filters.append((doctype, "docstatus", "<", 2))
else:
filters.append((doctype, "docstatus", "=", 1))
if user != "Guest" and is_website_user():
parties_doctype = 'Request for Quotation Supplier' if doctype == 'Request for Quotation' else doctype
@@ -112,7 +115,8 @@ def has_website_permission(doc, ptype, user, verbose=False):
return frappe.get_all(doctype, filters=[(doctype, "customer", "in", customers),
(doctype, "name", "=", doc.name)]) and True or False
elif suppliers:
return frappe.get_all(doctype, filters=[(doctype, "suppliers", "in", suppliers),
fieldname = 'suppliers' if doctype == 'Request for Quotation' else 'supplier'
return frappe.get_all(doctype, filters=[(doctype, fieldname, "in", suppliers),
(doctype, "name", "=", doc.name)]) and True or False
else:
return False