Fix daily_work_summary_settings migration patch
This commit is contained in:
parent
a509d4855b
commit
b58c317abb
@ -495,7 +495,7 @@ erpnext.patches.v10_0.set_b2c_limit
|
||||
erpnext.patches.v10_0.update_translatable_fields
|
||||
erpnext.patches.v10_0.rename_offer_letter_to_job_offer
|
||||
execute:frappe.delete_doc('DocType', 'Production Planning Tool', ignore_missing=True)
|
||||
erpnext.patches.v10_0.migrate_daily_work_summary_settings_to_daily_work_summary_group
|
||||
erpnext.patches.v10_0.migrate_daily_work_summary_settings_to_daily_work_summary_group # 24-12-2018
|
||||
erpnext.patches.v10_0.add_default_cash_flow_mappers
|
||||
erpnext.patches.v11_0.make_quality_inspection_template
|
||||
erpnext.patches.v10_0.update_status_for_multiple_source_in_po
|
||||
|
@ -6,6 +6,7 @@ import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
if not frappe.db.table_exists('Daily Work Summary Group'):
|
||||
frappe.reload_doc("hr", "doctype", "daily_work_summary_group")
|
||||
frappe.reload_doc("hr", "doctype", "daily_work_summary_group_user")
|
||||
|
||||
@ -32,11 +33,9 @@ def execute():
|
||||
new_group.flags.ignore_permissions = True
|
||||
new_group.flags.ignore_validate = True
|
||||
new_group.insert(ignore_if_duplicate = True)
|
||||
frappe.delete_doc("Daily Work Summary Settings")
|
||||
frappe.delete_doc("Daily Work Summary Settings Company")
|
||||
|
||||
def get_setting_companies():
|
||||
return frappe.db.sql("select * from `tabDaily Work Summary Settings Company`", as_dict=True)
|
||||
frappe.delete_doc("DocType", "Daily Work Summary Settings")
|
||||
frappe.delete_doc("DocType", "Daily Work Summary Settings Company")
|
||||
|
||||
|
||||
def get_previous_setting():
|
||||
@ -47,3 +46,6 @@ def get_previous_setting():
|
||||
obj[field] = value
|
||||
obj["companies"] = get_setting_companies()
|
||||
return obj
|
||||
|
||||
def get_setting_companies():
|
||||
return frappe.db.sql("select * from `tabDaily Work Summary Settings Company`", as_dict=True)
|
Loading…
x
Reference in New Issue
Block a user