mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 23:52:57 +00:00
fix: if id not found then compare item name to avoid duplicate item creation (#19002)
This commit is contained in:
@@ -62,7 +62,8 @@ def _order(*args, **kwargs):
|
|||||||
|
|
||||||
item_woo_com_id = item.get("product_id")
|
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
|
#Edit
|
||||||
link_item(item,1)
|
link_item(item,1)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user