fix: filters not getting applied on Web Form
This commit is contained in:
parent
9a8f8e8b7d
commit
9c1e566394
@ -76,12 +76,9 @@ def get_transaction_list(
|
|||||||
ignore_permissions = False
|
ignore_permissions = False
|
||||||
|
|
||||||
if not filters:
|
if not filters:
|
||||||
filters = []
|
filters = {}
|
||||||
|
|
||||||
if doctype in ["Supplier Quotation", "Purchase Invoice"]:
|
filters["docstatus"] = ["<", "2"] if doctype in ["Supplier Quotation", "Purchase Invoice"] else 1
|
||||||
filters.append((doctype, "docstatus", "<", 2))
|
|
||||||
else:
|
|
||||||
filters.append((doctype, "docstatus", "=", 1))
|
|
||||||
|
|
||||||
if (user != "Guest" and is_website_user()) or doctype == "Request for Quotation":
|
if (user != "Guest" and is_website_user()) or doctype == "Request for Quotation":
|
||||||
parties_doctype = (
|
parties_doctype = (
|
||||||
@ -92,12 +89,12 @@ def get_transaction_list(
|
|||||||
|
|
||||||
if customers:
|
if customers:
|
||||||
if doctype == "Quotation":
|
if doctype == "Quotation":
|
||||||
filters.append(("quotation_to", "=", "Customer"))
|
filters["quotation_to"] = "Customer"
|
||||||
filters.append(("party_name", "in", customers))
|
filters["party_name"] = ["in", customers]
|
||||||
else:
|
else:
|
||||||
filters.append(("customer", "in", customers))
|
filters["customer"] = ["in", customers]
|
||||||
elif suppliers:
|
elif suppliers:
|
||||||
filters.append(("supplier", "in", suppliers))
|
filters["supplier"] = ["in", suppliers]
|
||||||
elif not custom:
|
elif not custom:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
@ -110,7 +107,7 @@ def get_transaction_list(
|
|||||||
|
|
||||||
if not customers and not suppliers and custom:
|
if not customers and not suppliers and custom:
|
||||||
ignore_permissions = False
|
ignore_permissions = False
|
||||||
filters = []
|
filters = {}
|
||||||
|
|
||||||
transactions = get_list_for_transactions(
|
transactions = get_list_for_transactions(
|
||||||
doctype,
|
doctype,
|
||||||
|
Loading…
Reference in New Issue
Block a user