[hub][patch] reset publish_in_hub for all items

This commit is contained in:
Prateeksha Singh 2018-07-27 22:02:47 +05:30
parent 19d40cafba
commit 6e7fb71f1f
4 changed files with 53 additions and 51 deletions

View File

@ -1,55 +1,55 @@
{
"condition": "{\"publish_in_hub\": 1}",
"creation": "2017-09-07 13:27:52.726350",
"docstatus": 0,
"doctype": "Data Migration Mapping",
"condition": "{\"publish_in_hub\": 1}",
"creation": "2017-09-07 13:27:52.726350",
"docstatus": 0,
"doctype": "Data Migration Mapping",
"fields": [
{
"is_child_table": 0,
"local_fieldname": "item_code",
"is_child_table": 0,
"local_fieldname": "item_code",
"remote_fieldname": "item_code"
},
},
{
"is_child_table": 0,
"local_fieldname": "item_name",
"is_child_table": 0,
"local_fieldname": "item_name",
"remote_fieldname": "item_name"
},
},
{
"is_child_table": 0,
"local_fieldname": "eval:frappe.db.get_default(\"company\")",
"is_child_table": 0,
"local_fieldname": "eval:frappe.db.get_default(\"company\")",
"remote_fieldname": "company_name"
},
},
{
"is_child_table": 0,
"local_fieldname": "image",
"is_child_table": 0,
"local_fieldname": "image",
"remote_fieldname": "image"
},
},
{
"is_child_table": 0,
"local_fieldname": "item_group",
"is_child_table": 0,
"local_fieldname": "item_group",
"remote_fieldname": "item_group"
},
},
{
"is_child_table": 0,
"local_fieldname": "eval:frappe.session.user",
"is_child_table": 0,
"local_fieldname": "eval:frappe.session.user",
"remote_fieldname": "seller"
},
},
{
"is_child_table": 0,
"local_fieldname": "eval:frappe.db.get_default(\"country\")",
"is_child_table": 0,
"local_fieldname": "eval:frappe.db.get_default(\"country\")",
"remote_fieldname": "country"
}
],
"idx": 1,
"local_doctype": "Item",
"mapping_name": "Item to Hub Item",
"mapping_type": "Push",
"migration_id_field": "hub_sync_id",
"modified": "2018-02-14 15:57:05.595712",
"modified_by": "achilles@erpnext.com",
"name": "Item to Hub Item",
"owner": "Administrator",
"page_length": 10,
"remote_objectname": "Hub Item",
],
"idx": 1,
"local_doctype": "Item",
"mapping_name": "Item to Hub Item",
"mapping_type": "Push",
"migration_id_field": "hub_sync_id",
"modified": "2018-07-27 21:52:52.383842",
"modified_by": "cave@aperture.com",
"name": "Item to Hub Item",
"owner": "Administrator",
"page_length": 10,
"remote_objectname": "Hub Item",
"remote_primary_key": "item_code"
}

View File

@ -1,22 +1,18 @@
{
"creation": "2017-09-07 11:39:38.445902",
"docstatus": 0,
"doctype": "Data Migration Plan",
"idx": 1,
"creation": "2017-09-07 11:39:38.445902",
"docstatus": 0,
"doctype": "Data Migration Plan",
"idx": 1,
"mappings": [
{
"enabled": 1,
"enabled": 1,
"mapping": "Item to Hub Item"
},
{
"enabled": 1,
"mapping": "Hub Message to Lead"
}
],
"modified": "2018-02-14 15:57:05.519715",
"modified_by": "achilles@erpnext.com",
"module": "Hub Node",
"name": "Hub Sync",
"owner": "Administrator",
],
"modified": "2018-07-27 21:52:52.324025",
"modified_by": "cave@aperture.com",
"module": "Hub Node",
"name": "Hub Sync",
"owner": "Administrator",
"plan_name": "Hub Sync"
}

View File

@ -560,3 +560,4 @@ erpnext.patches.v11_0.rename_healthcare_doctype_and_fields
erpnext.patches.v11_0.add_item_group_defaults
erpnext.patches.v10_0.update_address_template_for_india
execute:frappe.delete_doc("Page", "hub")
erpnext.patches.v11_0.reset_publish_in_hub_for_all_items

View File

@ -0,0 +1,5 @@
import frappe
def execute():
frappe.reload_doc('stock', 'doctype', 'item')
frappe.db.sql("""update `tabItem` set publish_in_hub = 0""")