color field for calendar in sales order and work order

This commit is contained in:
Shreya 2018-04-29 12:13:09 +05:30
parent 62907472f3
commit a7b2fc9250
5 changed files with 38 additions and 13 deletions

View File

@ -1481,6 +1481,37 @@
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 1,
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "_color",
"fieldtype": "Color",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Color",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@ -1526,7 +1557,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2018-03-05 12:43:10.442928",
"modified": "2018-04-27 16:48:31.251817",
"modified_by": "Administrator",
"module": "Manufacturing",
"name": "Work Order",
@ -1534,7 +1565,6 @@
"permissions": [
{
"amend": 1,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,
@ -1554,7 +1584,6 @@
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,

View File

@ -7,6 +7,7 @@ frappe.views.calendar["Work Order"] = {
"end": "planned_end_date",
"id": "name",
"title": "name",
"color": "_color",
"allDay": "allDay",
"progress": function(data) {
return flt(data.produced_qty) / data.qty * 100;

View File

@ -2825,9 +2825,9 @@
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"translatable": 0,
"unique": 0
},
},
{
"allow_bulk_edit": 0,
"allow_on_submit": 0,
@ -3650,7 +3650,6 @@
"permissions": [
{
"amend": 1,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,
@ -3670,7 +3669,6 @@
},
{
"amend": 1,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,
@ -3690,7 +3688,6 @@
},
{
"amend": 1,
"apply_user_permissions": 0,
"cancel": 1,
"create": 1,
"delete": 1,
@ -3710,7 +3707,6 @@
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
@ -3730,7 +3726,6 @@
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,
@ -3750,7 +3745,6 @@
},
{
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 0,
"delete": 0,

View File

@ -662,7 +662,7 @@ def get_events(start, end, filters=None):
data = frappe.db.sql("""
select
distinct `tabSales Order`.name, `tabSales Order`.customer_name, `tabSales Order`.status,
`tabSales Order`.delivery_status, `tabSales Order`.billing_status,
`tabSales Order`.delivery_status, `tabSales Order`.billing_status, `tabSales Order`._color,
`tabSales Order Item`.delivery_date
from
`tabSales Order`, `tabSales Order Item`

View File

@ -7,7 +7,8 @@ frappe.views.calendar["Sales Order"] = {
"end": "delivery_date",
"id": "name",
"title": "customer_name",
"allDay": "allDay"
"allDay": "allDay",
"color": "_color"
},
gantt: true,
filters: [