Merge branch 'develop' into maintainance-ux-fix
diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
index ce95db3..e940b60 100644
--- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
@@ -20,6 +20,12 @@
frm.set_value({transaction_date: frappe.datetime.get_today()});
}
},
+ refresh: function(frm) {
+ setTimeout(() => {
+ frm.toggle_display('generate_schedule', !(frm.is_new()));
+ frm.toggle_display('schedule', !(frm.is_new()));
+ },10);
+ },
customer: function(frm) {
erpnext.utils.get_party_details(frm)
},
diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py
index 3a64e1a..94d85f7 100644
--- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py
+++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py
@@ -150,7 +150,7 @@
elif not d.no_of_visits:
throw(_("Please mention no of visits required"))
elif not d.sales_person:
- throw(_("Please select Incharge Person's name"))
+ throw(_("Please select a Sales Person for item: {0}".format(d.item_name)))
if getdate(d.start_date) >= getdate(d.end_date):
throw(_("Start date should be less than end date for Item {0}").format(d.item_code))