Price List selection in mandatory for enabling Shopping Cart in ERPNext. As a work-around, set rate in the Item Price as zero, so no rate will be visible on the Website.
Sales Invoice will have all the details fetched from Sales Order, the only work will be to enter Item rates.
Hope someone will help you on how to achieve this with customization. May be if you can just get the draft of the SAles Order (not submitted), that should resolve your query.
You can comment/remove the code for sales order submit to save it as draft only
@frappe.whitelist()
def place_order():
quotation = _get_cart_quotation()
quotation.company = frappe.db.get_value("Shopping Cart Settings", None, "company")
for fieldname in ["customer_address", "shipping_address_name"]:
if not quotation.get(fieldname):
throw(_("{0} is required").format(quotation.meta.get_label(fieldname)))
quotation.flags.ignore_permissions = True
quotation.submit()
if quotation.lead:
# company used to create customer accounts
frappe.defaults.set_user_default("company", quotation.company)
from erpnext.selling.doctype.quotation.quotation import _make_sales_order
sales_order = frappe.get_doc(_make_sales_order(quotation.name, ignore_permissions=True))
for item in sales_order.get("items"):
item.reserved_warehouse = frappe.db.get_value("Item", item.item_code, "website_warehouse") or None
sales_order.flags.ignore_permissions = True
sales_order.insert()
#sales_order.submit()
can we set cart item quantity by default to 1 only …so that when customer place the order they can’t change the quantity …i WANT to set default to one quantity only for every item?