Hub Seller Profile and Timeline

- profile details fetched from server
- timeline updates on publishing items
This commit is contained in:
Prateeksha Singh
2018-07-29 16:52:16 +05:30
parent 6f05ea124e
commit d27b27f88a
2 changed files with 71 additions and 18 deletions

View File

@@ -93,22 +93,23 @@ def item_sync_preprocess():
})
if response:
# frappe.db.set_value("Hub Settings", "Hub Settings", "sync_in_progress", 1)
frappe.db.set_value("Hub Settings", "Hub Settings", "sync_in_progress", 1)
return response
else:
return ''
def item_sync_postprocess(obj):
response = call_hub_method('update_activity_for_seller', {
'hub_seller': frappe.db.get_value("Hub Settings", "Hub Settings", "company_email"),
'name': obj["remote_id"],
'status': obj["status"]
'hub_seller': frappe.db.get_value('Hub Settings', 'Hub Settings', 'company_email'),
'name': obj['remote_id'],
'status': obj['status'],
'stats': obj['stats']
})
if response:
frappe.db.set_value("Hub Settings", "Hub Settings", "sync_in_progress", 0)
frappe.db.set_value('Hub Settings', 'Hub Settings', 'sync_in_progress', 0)
else:
frappe.throw("Unable to update remote activity")
frappe.throw('Unable to update remote activity')
@frappe.whitelist()
def get_item_favourites(start=0, limit=20, fields=["*"], order_by=None):