mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-17 17:26:43 +00:00
fix: Set Price List in case of User Permissions (#21238)
Frontport of #18968
This commit is contained in:
@@ -163,8 +163,9 @@ def get_default_price_list(party):
|
||||
def set_price_list(party_details, party, party_type, given_price_list, pos=None):
|
||||
# price list
|
||||
price_list = get_permitted_documents('Price List')
|
||||
|
||||
if price_list:
|
||||
|
||||
# if there is only one permitted document based on user permissions, set it
|
||||
if price_list and len(price_list) == 1:
|
||||
price_list = price_list[0]
|
||||
elif pos and party_type == 'Customer':
|
||||
customer_price_list = frappe.get_value('Customer', party.name, 'default_price_list')
|
||||
|
||||
Reference in New Issue
Block a user