mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 12:49:10 +00:00
fix: Ignore missing customer group while fetching price list
This commit is contained in:
@@ -151,7 +151,7 @@ def set_contact_details(party_details, party, party_type):
|
||||
|
||||
def set_other_values(party_details, party, party_type):
|
||||
# copy
|
||||
if party_type=="Customer":
|
||||
if party_type == "Customer":
|
||||
to_copy = ["customer_name", "customer_group", "territory", "language"]
|
||||
else:
|
||||
to_copy = ["supplier_name", "supplier_group", "language"]
|
||||
@@ -170,12 +170,11 @@ def get_default_price_list(party):
|
||||
return party.default_price_list
|
||||
|
||||
if party.doctype == "Customer":
|
||||
price_list = frappe.get_cached_value("Customer Group",
|
||||
party.customer_group, "default_price_list")
|
||||
if price_list:
|
||||
return price_list
|
||||
try:
|
||||
return frappe.get_cached_value("Customer Group", party.customer_group, "default_price_list")
|
||||
except frappe.exceptions.DoesNotExistError:
|
||||
return
|
||||
|
||||
return None
|
||||
|
||||
def set_price_list(party_details, party, party_type, given_price_list, pos=None):
|
||||
# price list
|
||||
|
||||
Reference in New Issue
Block a user