diff --git a/erpnext/shopping_cart/cart.py b/erpnext/shopping_cart/cart.py index 3dd8729eb54..6fdc649e3f5 100644 --- a/erpnext/shopping_cart/cart.py +++ b/erpnext/shopping_cart/cart.py @@ -60,7 +60,7 @@ def place_order(): quotation.flags.ignore_permissions = True quotation.submit() - if quotation.lead: + if quotation.quotation_to == 'Lead' and quotation.party_name: # company used to create customer accounts frappe.defaults.set_user_default("company", quotation.company)