Merge pull request #27713 from frappe-pr-bot/backport/version-13-hotfix/27554
fix: Maintenance Schedule child table status for legacy data
This commit is contained in:
@@ -89,13 +89,14 @@
|
||||
"width": "160px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"columns": 2,
|
||||
"default": "Pending",
|
||||
"fieldname": "completion_status",
|
||||
"fieldtype": "Select",
|
||||
"in_list_view": 1,
|
||||
"label": "Completion Status",
|
||||
"options": "Pending\nPartially Completed\nFully Completed",
|
||||
"read_only": 1
|
||||
"options": "Pending\nPartially Completed\nFully Completed"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_3",
|
||||
@@ -125,10 +126,11 @@
|
||||
"idx": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-05-27 16:07:25.905015",
|
||||
"modified": "2021-09-16 21:25:22.506485",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Maintenance",
|
||||
"name": "Maintenance Schedule Detail",
|
||||
"naming_rule": "Random",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
|
||||
@@ -319,3 +319,4 @@ erpnext.patches.v13_0.create_custom_field_for_finance_book
|
||||
erpnext.patches.v13_0.modify_invalid_gain_loss_gl_entries
|
||||
erpnext.patches.v13_0.fix_additional_cost_in_mfg_stock_entry
|
||||
erpnext.patches.v13_0.shopping_cart_to_ecommerce
|
||||
erpnext.patches.v13_0.set_status_in_maintenance_schedule_table
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("maintenance", "doctype", "Maintenance Schedule Detail")
|
||||
frappe.db.sql("""
|
||||
UPDATE `tabMaintenance Schedule Detail`
|
||||
SET completion_status = 'Pending'
|
||||
WHERE docstatus < 2
|
||||
""")
|
||||
Reference in New Issue
Block a user