Merge branch 'develop' into patch_assdeprsch_gpa_ndb
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index 3ea0216..fc16a91 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -84,9 +84,6 @@
)
if not self.meta.get_field("sales_team"):
party_details.pop("sales_team")
- else:
- self.set("sales_team", party_details.get("sales_team"))
-
self.update_if_missing(party_details)
elif lead:
diff --git a/erpnext/controllers/website_list_for_contact.py b/erpnext/controllers/website_list_for_contact.py
index 4673230..7c3c387 100644
--- a/erpnext/controllers/website_list_for_contact.py
+++ b/erpnext/controllers/website_list_for_contact.py
@@ -76,12 +76,9 @@
ignore_permissions = False
if not filters:
- filters = []
+ filters = {}
- if doctype in ["Supplier Quotation", "Purchase Invoice"]:
- filters.append((doctype, "docstatus", "<", 2))
- else:
- filters.append((doctype, "docstatus", "=", 1))
+ filters["docstatus"] = ["<", "2"] if doctype in ["Supplier Quotation", "Purchase Invoice"] else 1
if (user != "Guest" and is_website_user()) or doctype == "Request for Quotation":
parties_doctype = (
@@ -92,12 +89,12 @@
if customers:
if doctype == "Quotation":
- filters.append(("quotation_to", "=", "Customer"))
- filters.append(("party_name", "in", customers))
+ filters["quotation_to"] = "Customer"
+ filters["party_name"] = ["in", customers]
else:
- filters.append(("customer", "in", customers))
+ filters["customer"] = ["in", customers]
elif suppliers:
- filters.append(("supplier", "in", suppliers))
+ filters["supplier"] = ["in", suppliers]
elif not custom:
return []
@@ -110,7 +107,7 @@
if not customers and not suppliers and custom:
ignore_permissions = False
- filters = []
+ filters = {}
transactions = get_list_for_transactions(
doctype,