Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "woocommerce_fusion",
"version": "1.17.2",
"version": "1.17.3",
"author": "Starktail (Pty) Ltd <support@starktail.com>",
"main": "index.js",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion woocommerce_fusion/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.17.2"
__version__ = "1.17.3"
5 changes: 5 additions & 0 deletions woocommerce_fusion/tasks/sync_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ def run_item_sync_from_hook(doc, method):
doc.doctype == "Item"
and not doc.flags.get("created_by_sync", None)
and len(doc.woocommerce_servers) > 0
and any(
frappe.get_cached_doc("WooCommerce Server", row.woocommerce_server).enable_sync
for row in doc.woocommerce_servers
if row.woocommerce_server
)
):
frappe.msgprint(
_("Background sync to WooCommerce triggered for {0} {1}").format(frappe.bold(doc.name), method),
Expand Down
7 changes: 6 additions & 1 deletion woocommerce_fusion/tasks/sync_sales_orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@


def run_sales_order_sync_from_hook(doc, method):
if doc.doctype == "Sales Order" and not doc.flags.get("created_by_sync", None) and doc.woocommerce_server:
if (
doc.doctype == "Sales Order"
and not doc.flags.get("created_by_sync", None)
and doc.woocommerce_server
and frappe.get_cached_doc("WooCommerce Server", doc.woocommerce_server).enable_sync
):
frappe.enqueue(run_sales_order_sync, queue="long", sales_order_name=doc.name)


Expand Down
Loading