diff --git a/erpnext/education/api.py b/erpnext/education/api.py index ef1cc46f2f5..8571bf9381b 100644 --- a/erpnext/education/api.py +++ b/erpnext/education/api.py @@ -189,7 +189,7 @@ def get_course_schedule_events(start, end, filters=None): from frappe.desk.calendar import get_event_conditions conditions = get_event_conditions("Course Schedule", filters) - data = frappe.db.sql("""select name, course, _color, + data = frappe.db.sql("""select name, course, color, timestamp(schedule_date, from_time) as from_datetime, timestamp(schedule_date, to_time) as to_datetime, room, student_group, 0 as 'allDay' diff --git a/erpnext/education/doctype/course_schedule/course_schedule.json b/erpnext/education/doctype/course_schedule/course_schedule.json index 82128712165..9b7d89794c6 100644 --- a/erpnext/education/doctype/course_schedule/course_schedule.json +++ b/erpnext/education/doctype/course_schedule/course_schedule.json @@ -210,7 +210,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "_color", + "fieldname": "color", "fieldtype": "Color", "hidden": 0, "ignore_user_permissions": 0, @@ -464,7 +464,7 @@ "istable": 0, "max_attachments": 0, "menu_index": 0, - "modified": "2018-04-29 12:02:31.960104", + "modified": "2018-04-30 12:49:51.094872", "modified_by": "Administrator", "module": "Education", "name": "Course Schedule", diff --git a/erpnext/education/doctype/course_schedule/course_schedule_calendar.js b/erpnext/education/doctype/course_schedule/course_schedule_calendar.js index 09c441d0040..803527e5480 100644 --- a/erpnext/education/doctype/course_schedule/course_schedule_calendar.js +++ b/erpnext/education/doctype/course_schedule/course_schedule_calendar.js @@ -5,8 +5,7 @@ frappe.views.calendar["Course Schedule"] = { "end": "to_datetime", "id": "name", "title": "course", - "allDay": "allDay", - "color": "_color" + "allDay": "allDay" }, gantt: false, order_by: "schedule_date", diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.json b/erpnext/hr/doctype/holiday_list/holiday_list.json index 314a0ea9ceb..f417cb2b71b 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list.json +++ b/erpnext/hr/doctype/holiday_list/holiday_list.json @@ -269,7 +269,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "_color", + "fieldname": "color", "fieldtype": "Color", "hidden": 0, "ignore_user_permissions": 0, @@ -306,7 +306,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2018-04-27 17:16:37.720416", + "modified": "2018-04-30 12:49:59.239227", "modified_by": "Administrator", "module": "HR", "name": "Holiday List", diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.py b/erpnext/hr/doctype/holiday_list/holiday_list.py index b668719b94c..269195957a8 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list.py +++ b/erpnext/hr/doctype/holiday_list/holiday_list.py @@ -79,6 +79,6 @@ def get_events(start, end, filters=None): if end: filters.append(['Holiday', 'holiday_date', '<', getdate(end)]) return frappe.get_list('Holiday List', - fields=['name', '`tabHoliday`.holiday_date', '`tabHoliday`.description', '`tabHoliday List`._color'], + fields=['name', '`tabHoliday`.holiday_date', '`tabHoliday`.description', '`tabHoliday List`.color'], filters = filters, update={"allDay": 1}) diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js index 7ac0b6b0b28..8f4dc284414 100644 --- a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js +++ b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js @@ -8,7 +8,7 @@ frappe.views.calendar["Holiday List"] = { "id": "name", "title": "description", "allDay": "allDay", - "color": "_color" + "color": "color" }, get_events_method: "erpnext.hr.doctype.holiday_list.holiday_list.get_events", filters: [ diff --git a/erpnext/hr/doctype/leave_application/leave_application.json b/erpnext/hr/doctype/leave_application/leave_application.json index 24f2dc67e34..290120b5bfd 100644 --- a/erpnext/hr/doctype/leave_application/leave_application.json +++ b/erpnext/hr/doctype/leave_application/leave_application.json @@ -695,7 +695,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "_color", + "fieldname": "color", "fieldtype": "Color", "hidden": 0, "ignore_user_permissions": 0, @@ -854,7 +854,7 @@ "issingle": 0, "istable": 0, "max_attachments": 3, - "modified": "2018-04-27 17:37:43.021792", + "modified": "2018-04-30 12:49:40.845022", "modified_by": "Administrator", "module": "HR", "name": "Leave Application", diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py index eca858b8468..6ad8b7efcac 100755 --- a/erpnext/hr/doctype/leave_application/leave_application.py +++ b/erpnext/hr/doctype/leave_application/leave_application.py @@ -407,7 +407,7 @@ def add_department_leaves(events, start, end, employee, company): add_leaves(events, start, end, match_conditions=match_conditions) def add_leaves(events, start, end, match_conditions=None): - query = """select name, from_date, to_date, employee_name, _color, half_day, + query = """select name, from_date, to_date, employee_name, color, half_day, employee, docstatus from `tabLeave Application` where from_date <= %(end)s and to_date >= %(start)s <= to_date @@ -421,8 +421,8 @@ def add_leaves(events, start, end, match_conditions=None): "doctype": "Leave Application", "from_date": d.from_date, "to_date": d.to_date, - "docstatus": d.docstatus, - "color": d._color, + "docstatus": d.docstatus, + "color": d.color, "title": cstr(d.employee_name) + \ (d.half_day and _(" (Half Day)") or ""), } diff --git a/erpnext/hr/doctype/leave_application/leave_application_calendar.js b/erpnext/hr/doctype/leave_application/leave_application_calendar.js index 3fbf42a182d..0e0d8645fa4 100644 --- a/erpnext/hr/doctype/leave_application/leave_application_calendar.js +++ b/erpnext/hr/doctype/leave_application/leave_application_calendar.js @@ -7,8 +7,7 @@ frappe.views.calendar["Leave Application"] = { "end": "to_date", "id": "name", "title": "title", - "docstatus": 1, - "color": "_color" + "docstatus": 1 }, options: { header: { @@ -16,6 +15,6 @@ frappe.views.calendar["Leave Application"] = { center: 'title', right: 'month' } - }, + }, get_events_method: "erpnext.hr.doctype.leave_application.leave_application.get_events" } \ No newline at end of file diff --git a/erpnext/projects/doctype/task/task.json b/erpnext/projects/doctype/task/task.json index fd80d5ed680..ee93bcc7404 100644 --- a/erpnext/projects/doctype/task/task.json +++ b/erpnext/projects/doctype/task/task.json @@ -503,7 +503,7 @@ "bold": 0, "collapsible": 0, "columns": 0, - "fieldname": "_color", + "fieldname": "color", "fieldtype": "Color", "hidden": 0, "ignore_user_permissions": 0, @@ -1283,7 +1283,7 @@ "istable": 0, "max_attachments": 5, "menu_index": 0, - "modified": "2018-04-27 16:31:41.490545", + "modified": "2018-04-30 12:48:52.743838", "modified_by": "Administrator", "module": "Projects", "name": "Task", diff --git a/erpnext/projects/doctype/task/task_calendar.js b/erpnext/projects/doctype/task/task_calendar.js index a21672317b8..49dbb76a1a5 100644 --- a/erpnext/projects/doctype/task/task_calendar.js +++ b/erpnext/projects/doctype/task/task_calendar.js @@ -8,8 +8,7 @@ frappe.views.calendar["Task"] = { "id": "name", "title": "subject", "allDay": "allDay", - "progress": "progress", - "color": "_color" + "progress": "progress" }, gantt: true, filters: [