From d8f7de9946fb9e6a4e8e86d809cb56bacbcd0b3d Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Thu, 15 Mar 2018 12:48:32 +0530 Subject: [PATCH 1/2] fixed patch for hub --- erpnext/agriculture/doctype/crop_cycle/crop_cycle.py | 1 + erpnext/patches.txt | 1 + erpnext/patches/v10_0/update_hub_connector_domain.py | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 erpnext/patches/v10_0/update_hub_connector_domain.py diff --git a/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py b/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py index 21dfe317b7..ea344ed351 100644 --- a/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py +++ b/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py @@ -50,6 +50,7 @@ class CropCycle(Document): project.expected_start_date = self.start_date project.expected_end_date = frappe.utils.data.add_days(self.start_date, period-1) project.insert() + print(project) self.create_task(crop_tasks, project.as_dict.im_self.name, self.start_date) return project.as_dict.im_self.name diff --git a/erpnext/patches.txt b/erpnext/patches.txt index d06b405821..512e440a93 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -495,3 +495,4 @@ erpnext.patches.v10_0.set_auto_created_serial_no_in_stock_entry erpnext.patches.v10_0.update_territory_and_customer_group erpnext.patches.v10_0.update_warehouse_address_details erpnext.patches.v10_0.update_reserved_qty_for_purchase_order +erpnext.patches.v10_0.update_hub_connector_domain diff --git a/erpnext/patches/v10_0/update_hub_connector_domain.py b/erpnext/patches/v10_0/update_hub_connector_domain.py new file mode 100644 index 0000000000..fc3c29403f --- /dev/null +++ b/erpnext/patches/v10_0/update_hub_connector_domain.py @@ -0,0 +1,8 @@ +import frappe + +def execute(): + frappe.db.sql(""" + UPDATE `tabData Migration Connector` + SET hostname = 'https://hubmarket.org' + WHERE connector_name = 'Hub Connector' + """) \ No newline at end of file From 94b41ea4f6871185a00e46d86d6483e6b8a4fcb9 Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Thu, 15 Mar 2018 12:53:22 +0530 Subject: [PATCH 2/2] removed debugging --- erpnext/agriculture/doctype/crop_cycle/crop_cycle.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py b/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py index ea344ed351..21dfe317b7 100644 --- a/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py +++ b/erpnext/agriculture/doctype/crop_cycle/crop_cycle.py @@ -50,7 +50,6 @@ class CropCycle(Document): project.expected_start_date = self.start_date project.expected_end_date = frappe.utils.data.add_days(self.start_date, period-1) project.insert() - print(project) self.create_task(crop_tasks, project.as_dict.im_self.name, self.start_date) return project.as_dict.im_self.name