some fixes for renaming patch
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.json b/erpnext/hr/doctype/holiday_list/holiday_list.json
index 3782102..a94f8ca 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list.json
+++ b/erpnext/hr/doctype/holiday_list/holiday_list.json
@@ -1,99 +1,99 @@
{
- "allow_import": 1,
- "autoname": "field:holiday_list_name",
- "creation": "2013-01-10 16:34:14",
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Master",
+ "allow_import": 1,
+ "autoname": "field:holiday_list_name",
+ "creation": "2013-01-10 16:34:14",
+ "docstatus": 0,
+ "doctype": "DocType",
+ "document_type": "Master",
"fields": [
{
- "fieldname": "holiday_list_name",
- "fieldtype": "Data",
- "in_list_view": 1,
- "label": "Holiday List Name",
- "oldfieldname": "holiday_list_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "reqd": 1,
- "unique": 1
- },
+ "fieldname": "holiday_list_name",
+ "fieldtype": "Data",
+ "in_list_view": 1,
+ "label": "Holiday List Name",
+ "oldfieldname": "holiday_list_name",
+ "oldfieldtype": "Data",
+ "permlevel": 0,
+ "reqd": 1,
+ "unique": 0
+ },
{
- "fieldname": "is_default",
- "fieldtype": "Check",
- "in_list_view": 1,
- "label": "Default",
+ "fieldname": "is_default",
+ "fieldtype": "Check",
+ "in_list_view": 1,
+ "label": "Default",
"permlevel": 0
- },
+ },
{
- "fieldname": "fiscal_year",
- "fieldtype": "Link",
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Fiscal Year",
- "oldfieldname": "fiscal_year",
- "oldfieldtype": "Link",
- "options": "Fiscal Year",
- "permlevel": 0,
+ "fieldname": "fiscal_year",
+ "fieldtype": "Link",
+ "in_filter": 1,
+ "in_list_view": 1,
+ "label": "Fiscal Year",
+ "oldfieldname": "fiscal_year",
+ "oldfieldtype": "Link",
+ "options": "Fiscal Year",
+ "permlevel": 0,
"reqd": 1
- },
+ },
{
- "fieldname": "weekly_off",
- "fieldtype": "Select",
- "in_list_view": 1,
- "label": "Weekly Off",
- "no_copy": 1,
- "options": "\nSunday\nMonday\nTuesday\nWednesday\nThursday\nFriday\nSaturday",
- "permlevel": 0,
- "print_hide": 1,
+ "fieldname": "weekly_off",
+ "fieldtype": "Select",
+ "in_list_view": 1,
+ "label": "Weekly Off",
+ "no_copy": 1,
+ "options": "\nSunday\nMonday\nTuesday\nWednesday\nThursday\nFriday\nSaturday",
+ "permlevel": 0,
+ "print_hide": 1,
"report_hide": 1
- },
+ },
{
- "fieldname": "get_weekly_off_dates",
- "fieldtype": "Button",
- "label": "Get Weekly Off Dates",
- "options": "get_weekly_off_dates",
+ "fieldname": "get_weekly_off_dates",
+ "fieldtype": "Button",
+ "label": "Get Weekly Off Dates",
+ "options": "get_weekly_off_dates",
"permlevel": 0
- },
+ },
{
- "fieldname": "holidays",
- "fieldtype": "Table",
- "label": "Holidays",
- "oldfieldname": "holiday_list_details",
- "oldfieldtype": "Table",
- "options": "Holiday",
- "permlevel": 0,
+ "fieldname": "holidays",
+ "fieldtype": "Table",
+ "label": "Holidays",
+ "oldfieldname": "holiday_list_details",
+ "oldfieldtype": "Table",
+ "options": "Holiday",
+ "permlevel": 0,
"reqd": 0
- },
+ },
{
- "fieldname": "clear_table",
- "fieldtype": "Button",
- "label": "Clear Table",
- "options": "clear_table",
+ "fieldname": "clear_table",
+ "fieldtype": "Button",
+ "label": "Clear Table",
+ "options": "clear_table",
"permlevel": 0
}
- ],
- "icon": "icon-calendar",
- "idx": 1,
- "modified": "2014-12-24 15:32:58.469070",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Holiday List",
- "owner": "Administrator",
+ ],
+ "icon": "icon-calendar",
+ "idx": 1,
+ "modified": "2014-12-24 15:32:58.469070",
+ "modified_by": "Administrator",
+ "module": "HR",
+ "name": "Holiday List",
+ "owner": "Administrator",
"permissions": [
{
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "HR Manager",
- "submit": 0,
+ "cancel": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "permlevel": 0,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "HR Manager",
+ "submit": 0,
"write": 1
}
- ],
- "sort_field": "modified",
+ ],
+ "sort_field": "modified",
"sort_order": "DESC"
-}
\ No newline at end of file
+}
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index bc9f3ba..28c1f2c 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -36,8 +36,6 @@
execute:frappe.delete_doc("DocType", "MIS Control")
execute:frappe.delete_doc("Page", "Financial Statements")
execute:frappe.delete_doc("DocType", "Stock Ledger")
-execute:frappe.reload_doc("accounts", "doctype", "journal_entry") # 2014-12-31
-execute:frappe.db.sql("update `tabJournal Entry` set voucher_type='Journal Entry' where ifnull(voucher_type, '')=''")
execute:frappe.delete_doc("DocType", "Grade")
execute:frappe.db.sql("delete from `tabWebsite Item Group` where ifnull(item_group, '')=''")
execute:frappe.delete_doc("Print Format", "SalesInvoice")
@@ -65,7 +63,6 @@
erpnext.patches.v4_0.set_pricing_rule_for_buying_or_selling
erpnext.patches.v4_0.set_naming_series_property_setter
erpnext.patches.v4_1.set_outgoing_email_footer
-erpnext.patches.v4_1.fix_jv_remarks
erpnext.patches.v4_1.fix_sales_order_delivered_status
erpnext.patches.v4_1.fix_delivery_and_billing_status
execute:frappe.db.sql("update `tabAccount` set root_type='Liability' where root_type='Income' and report_type='Balance Sheet'")
@@ -98,6 +95,9 @@
execute:frappe.reload_doc('stock', 'doctype', 'item')
execute:frappe.db.sql("update `tabItem` i set apply_warehouse_wise_reorder_level=1, re_order_level=0, re_order_qty=0 where exists(select name from `tabItem Reorder` where parent=i.name)")
execute:frappe.rename_doc("DocType", "Support Ticket", "Issue", force=True)
-erpnext.patches.v5_0.recalculate_total_amount_in_jv
erpnext.patches.v5_0.set_default_company_in_bom
erpnext.patches.v5_0.capacity_planning
+erpnext.patches.v5_0.rename_table_fieldnames
+erpnext.patches.v5_0.recalculate_total_amount_in_jv
+execute:frappe.db.sql("update `tabJournal Entry` set voucher_type='Journal Entry' where ifnull(voucher_type, '')=''")
+erpnext.patches.v4_1.fix_jv_remarks
diff --git a/erpnext/patches/v4_1/fix_jv_remarks.py b/erpnext/patches/v4_1/fix_jv_remarks.py
index 513fb7f..3592f13 100644
--- a/erpnext/patches/v4_1/fix_jv_remarks.py
+++ b/erpnext/patches/v4_1/fix_jv_remarks.py
@@ -6,7 +6,6 @@
def execute():
reference_date = guess_reference_date()
- frappe.reload_doc('accounts', 'doctype', 'journal_voucher_detail')
for name in frappe.db.sql_list("""select name from `tabJournal Entry`
where date(creation)>=%s""", reference_date):
jv = frappe.get_doc("Journal Entry", name)
diff --git a/erpnext/patches/v5_0/rename_table_fieldnames.py b/erpnext/patches/v5_0/rename_table_fieldnames.py
index 288e372..53d807f 100644
--- a/erpnext/patches/v5_0/rename_table_fieldnames.py
+++ b/erpnext/patches/v5_0/rename_table_fieldnames.py
@@ -230,9 +230,11 @@
["Journal Voucher", "Journal Entry"],
["Budget Distribution Detail", "Monthly Distribution Percentage"],
["Budget Distribution", "Monthly Distribution"]]:
- if "tab"+old_dt not in tables:
+ if "tab"+new_dt not in tables:
frappe.rename_doc("DocType", old_dt, new_dt, force=True)
+ frappe.reload_doc("manufacturing", "doctype", "production_order_operation")
+
#rename table fieldnames
for dn in rename_map:
frappe.reload_doc(get_doctype_module(dn), "doctype", scrub(dn))