mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
[fix] ignore mandatory when creating customer and contact in cart
This commit is contained in:
@@ -292,7 +292,7 @@ def get_customer(user=None):
|
|||||||
"customer_group": get_shopping_cart_settings().default_customer_group,
|
"customer_group": get_shopping_cart_settings().default_customer_group,
|
||||||
"territory": get_root_of("Territory")
|
"territory": get_root_of("Territory")
|
||||||
})
|
})
|
||||||
customer.ignore_mandatory = True
|
customer.flags.ignore_mandatory = True
|
||||||
customer.insert(ignore_permissions=True)
|
customer.insert(ignore_permissions=True)
|
||||||
|
|
||||||
contact = frappe.new_doc("Contact")
|
contact = frappe.new_doc("Contact")
|
||||||
@@ -301,7 +301,7 @@ def get_customer(user=None):
|
|||||||
"first_name": fullname,
|
"first_name": fullname,
|
||||||
"email_id": user
|
"email_id": user
|
||||||
})
|
})
|
||||||
contact.ignore_mandatory = True
|
contact.flags.ignore_mandatory = True
|
||||||
contact.insert(ignore_permissions=True)
|
contact.insert(ignore_permissions=True)
|
||||||
|
|
||||||
return customer
|
return customer
|
||||||
|
|||||||
Reference in New Issue
Block a user