From 690278042d260f78d2cfd9b72cff809c710becdf Mon Sep 17 00:00:00 2001 From: Nihantra Patel Date: Tue, 16 Apr 2024 18:12:20 +0530 Subject: [PATCH] fix: address filter and quotation to for prospect (cherry picked from commit 24a68a79dfb284843677f46a9e1f768eead5fcd5) --- erpnext/accounts/party.py | 4 +++- erpnext/selling/doctype/quotation/quotation.js | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 27b78d3c3a9..8240b79bfdc 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -188,7 +188,9 @@ def set_address_details( *, ignore_permissions=False, ): - billing_address_field = "customer_address" if party_type in ["Lead", "Prospect"] else party_type.lower() + "_address" + billing_address_field = ( + "customer_address" if party_type in ["Lead", "Prospect"] else party_type.lower() + "_address" + ) party_details[billing_address_field] = party_address or get_default_address(party_type, party.name) if doctype: party_details.update( diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index 6dcebb082aa..654d96790eb 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -45,8 +45,8 @@ frappe.ui.form.on('Quotation', { frm.trigger("set_label"); frm.trigger("toggle_reqd_lead_customer"); frm.trigger("set_dynamic_field_label"); - frm.set_value("party_name", '') - frm.set_value("customer_name", '') + frm.set_value("party_name", "") + frm.set_value("customer_name", "") }, set_label: function(frm) {