Merge pull request #22468 from frappe/shopping-cart-settings
fix: enable show_configure_button when shopping cart is enabled
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py
index 016ab14..c889237 100644
--- a/erpnext/manufacturing/doctype/production_plan/production_plan.py
+++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py
@@ -643,7 +643,8 @@
doc['mr_items'] = []
- po_items = doc.get('po_items')
+ po_items = doc.get('po_items') if doc.get('po_items') else doc.get('items')
+ # Check for empty table or empty rows
if not po_items or not [row.get('item_code') for row in po_items if row.get('item_code')]:
frappe.throw(_("Items to Manufacture are required to pull the Raw Materials associated with it."),
title=_("Items Required"))
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index 682dfed..d70c64f 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -388,8 +388,7 @@
credit_controller_users = get_users_with_role(credit_controller_role or "Sales Master Manager")
# form a list of emails and names to show to the user
- credit_controller_users_list = [user for user in credit_controller_users if frappe.db.exists("Employee", {"prefered_email": user})]
- credit_controller_users = [get_formatted_email(user).replace("<", "(").replace(">", ")") for user in credit_controller_users_list]
+ credit_controller_users = [get_formatted_email(user).replace("<", "(").replace(">", ")") for user in credit_controller_users]
if not credit_controller_users:
frappe.throw(_("Please contact your administrator to extend the credit limits for {0}.".format(customer)))
@@ -409,7 +408,7 @@
'customer': customer,
'customer_outstanding': customer_outstanding,
'credit_limit': credit_limit,
- 'credit_controller_users_list': credit_controller_users_list
+ 'credit_controller_users_list': credit_controller_users
}
}
)