I'm struggling to achieve a sync of a woocommerce product to a ERPN Product bundle
I assume that the error is caused by the standard stock check in the sales_order.py file. this is shown in the traceback below.
File "apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py", line 181, in validate_warehouse
frappe.get_cached_value("Item", d.item_code, "is_stock_item") == 1
The problem that I can see is that ERPN bundles are not supposed to be "stock" items.
Is there a way to allow bundles from WCC sync_orders.py file?
BTW I created a SO manually using these bundles with no issue.
Thanks in advance
Traceback (most recent call last):
File "apps/woocommerceconnector/woocommerceconnector/sync_orders.py", line 53, in sync_woocommerce_orders
create_order(woocommerce_order, woocommerce_settings)
File "apps/woocommerceconnector/woocommerceconnector/sync_orders.py", line 268, in create_order
so = create_sales_order(woocommerce_order, woocommerce_settings, company)
File "apps/woocommerceconnector/woocommerceconnector/sync_orders.py", line 368, in create_sales_order
so.save(ignore_permissions=True)
File "apps/frappe/frappe/model/document.py", line 310, in save
return self._save(*args, kwargs)
File "apps/frappe/frappe/model/document.py", line 332, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 261, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1052, in run_before_save_methods
self.run_method("validate")
File "apps/frappe/frappe/model/document.py", line 941, in run_method
out = Document.hook(fn)(self, *args, *kwargs)
File "apps/frappe/frappe/model/document.py", line 1261, in composer
return composed(self, method, args, kwargs)
File "apps/frappe/frappe/model/document.py", line 1243, in runner
add_to_return_value(self, fn(self, *args, kwargs))
File "apps/frappe/frappe/model/document.py", line 938, in fn
return method_object(*args, *kwargs)
File "apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py", line 51, in validate
self.validate_warehouse()
File "apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py", line 181, in validate_warehouse
frappe.get_cached_value("Item", d.item_code, "is_stock_item") == 1
File "apps/frappe/frappe/init.py", line 1044, in get_cached_value
doc = get_cached_doc(doctype, name)
File "apps/frappe/frappe/init.py", line 1020, in get_cached_doc
doc = get_doc(args, kwargs)
File "apps/frappe/frappe/init.py", line 1074, in get_doc
doc = frappe.model.document.get_doc(*args, *kwargs)
File "apps/frappe/frappe/model/document.py", line 79, in get_doc
return controller(args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 118, in init
self.load_from_db()
File "apps/frappe/frappe/model/document.py", line 163, in load_from_db
frappe.throw(
File "apps/frappe/frappe/init.py", line 504, in throw
msgprint(
File "apps/frappe/frappe/init.py", line 479, in msgprint
_raise_exception()
File "apps/frappe/frappe/init.py", line 434, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: Item None not found
I'm struggling to achieve a sync of a woocommerce product to a ERPN Product bundle I assume that the error is caused by the standard stock check in the sales_order.py file. this is shown in the traceback below.
File "apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py", line 181, in validate_warehouse frappe.get_cached_value("Item", d.item_code, "is_stock_item") == 1
The problem that I can see is that ERPN bundles are not supposed to be "stock" items. Is there a way to allow bundles from WCC sync_orders.py file?
BTW I created a SO manually using these bundles with no issue.
Thanks in advance
Traceback (most recent call last): File "apps/woocommerceconnector/woocommerceconnector/sync_orders.py", line 53, in sync_woocommerce_orders create_order(woocommerce_order, woocommerce_settings) File "apps/woocommerceconnector/woocommerceconnector/sync_orders.py", line 268, in create_order so = create_sales_order(woocommerce_order, woocommerce_settings, company) File "apps/woocommerceconnector/woocommerceconnector/sync_orders.py", line 368, in create_sales_order so.save(ignore_permissions=True) File "apps/frappe/frappe/model/document.py", line 310, in save return self._save(*args, kwargs) File "apps/frappe/frappe/model/document.py", line 332, in _save return self.insert() File "apps/frappe/frappe/model/document.py", line 261, in insert self.run_before_save_methods() File "apps/frappe/frappe/model/document.py", line 1052, in run_before_save_methods self.run_method("validate") File "apps/frappe/frappe/model/document.py", line 941, in run_method out = Document.hook(fn)(self, *args, *kwargs) File "apps/frappe/frappe/model/document.py", line 1261, in composer return composed(self, method, args, kwargs) File "apps/frappe/frappe/model/document.py", line 1243, in runner add_to_return_value(self, fn(self, *args, kwargs)) File "apps/frappe/frappe/model/document.py", line 938, in fn return method_object(*args, *kwargs) File "apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py", line 51, in validate self.validate_warehouse() File "apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py", line 181, in validate_warehouse frappe.get_cached_value("Item", d.item_code, "is_stock_item") == 1 File "apps/frappe/frappe/init.py", line 1044, in get_cached_value doc = get_cached_doc(doctype, name) File "apps/frappe/frappe/init.py", line 1020, in get_cached_doc doc = get_doc(args, kwargs) File "apps/frappe/frappe/init.py", line 1074, in get_doc doc = frappe.model.document.get_doc(*args, *kwargs) File "apps/frappe/frappe/model/document.py", line 79, in get_doc return controller(args, **kwargs) File "apps/frappe/frappe/model/document.py", line 118, in init self.load_from_db() File "apps/frappe/frappe/model/document.py", line 163, in load_from_db frappe.throw( File "apps/frappe/frappe/init.py", line 504, in throw msgprint( File "apps/frappe/frappe/init.py", line 479, in msgprint _raise_exception() File "apps/frappe/frappe/init.py", line 434, in _raise_exception raise raise_exception(msg) frappe.exceptions.DoesNotExistError: Item None not found