diff --git a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py index 3f5cca1da8..cb16466dae 100644 --- a/erpnext/patches/v7_0/convert_timelog_to_timesheet.py +++ b/erpnext/patches/v7_0/convert_timelog_to_timesheet.py @@ -3,8 +3,7 @@ import frappe from erpnext.manufacturing.doctype.production_order.production_order import make_timesheet, add_timesheet_detail def execute(): - if "note" not in frappe.db.get_table_columns("timesheet"): - frappe.reload_doc('projects', 'doctype', 'timesheet') + frappe.reload_doc('projects', 'doctype', 'timesheet') for data in frappe.get_all('Time Log', fields=["*"], filters = [["docstatus", "<", "2"]]): diff --git a/erpnext/patches/v7_0/rename_time_sheet_doctype.py b/erpnext/patches/v7_0/rename_time_sheet_doctype.py index dc2fadabb6..a00804518b 100644 --- a/erpnext/patches/v7_0/rename_time_sheet_doctype.py +++ b/erpnext/patches/v7_0/rename_time_sheet_doctype.py @@ -1,7 +1,7 @@ import frappe def execute(): - if frappe.db.table_exists("Time Sheet"): + if frappe.db.table_exists("Time Sheet") and not frappe.db.table_exists("Timesheet"): frappe.rename_doc("DocType", "Time Sheet", "Timesheet") frappe.rename_doc("DocType", "Time Sheet Detail", "Timesheet Detail")