From 015038236c0e2e96486eb315862c9e865075900c Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Thu, 5 Dec 2019 02:10:57 +0530 Subject: [PATCH] fix: update hub item document --- erpnext/hub_node/api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/erpnext/hub_node/api.py b/erpnext/hub_node/api.py index 0d01c67650b..602d65e81a1 100644 --- a/erpnext/hub_node/api.py +++ b/erpnext/hub_node/api.py @@ -115,6 +115,16 @@ def get_valid_items(search_value=''): return valid_items +@frappe.whitelist() +def update_item(ref_doctype, ref_doc, data): + data = json.loads(data) + + data.update(dict(doctype=ref_doctype, name=ref_doc)) + try: + connection = get_hub_connection() + connection.update(data) + except Exception as e: + frappe.log_error(message=e, title='Hub Sync Error') @frappe.whitelist() def publish_selected_items(items_to_publish):