fix: if id not found then compare item name to avoid duplicate item creation (#19002)

This commit is contained in:
Saurabh
2019-09-12 19:23:24 +05:30
committed by Nabin Hait
parent 71e51714f2
commit 2b0c845cb8

View File

@@ -62,7 +62,8 @@ def _order(*args, **kwargs):
item_woo_com_id = item.get("product_id")
if frappe.get_value("Item",{"woocommerce_id": item_woo_com_id}):
if frappe.get_value("Item",{"woocommerce_id": item_woo_com_id}) or\
frappe.get_value("Item",{"item_name": item.get('name')}):
#Edit
link_item(item,1)
else: