fix(minor): after manual testing

This commit is contained in:
Rushabh Mehta 2019-05-24 11:22:31 +05:30
parent 04e89ce808
commit 7e4fb49c61
8 changed files with 481 additions and 1785 deletions

View File

@ -55,6 +55,19 @@ def get_data():
} }
] ]
}, },
{
"label": _("Maintenance"),
"items": [
{
"type": "doctype",
"name": "Maintenance Schedule",
},
{
"type": "doctype",
"name": "Maintenance Visit",
},
]
},
{ {
"label": _("Reports"), "label": _("Reports"),
"icon": "fa fa-list", "icon": "fa fa-list",

View File

@ -11,7 +11,7 @@ frappe.ui.form.on('Appraisal', {
}, },
onload: function(frm) { onload: function(frm) {
if(!frm.doc.status) { if(!frm.doc.status) {
frm.set_value('status', 'Open'); frm.set_value('status', 'Draft');
} }
}, },
kra_template: function(frm) { kra_template: function(frm) {

View File

@ -3,11 +3,8 @@
frappe.ui.form.on("Leave Control Panel", { frappe.ui.form.on("Leave Control Panel", {
onload: function(frm) { onload: function(frm) {
if (!frm.doc.posting_date) { if (!frm.doc.from_date) {
frm.set_value('posting_date', frappe.datetime.get_today()); frm.set_value('from_date', frappe.datetime.get_today());
}
if (!frm.doc.leave_transaction_type) {
frm.set_value('leave_transaction_type', 'Allocation');
} }
}, },
refresh: function(frm) { refresh: function(frm) {
@ -23,8 +20,5 @@ frappe.ui.form.on("Leave Control Panel", {
}; };
}); });
} }
},
allocation_type: function (frm) {
frm.set_value('no_of_days', '');
} }
}); });

View File

@ -1,530 +1,150 @@
{ {
"allow_copy": 1, "allow_copy": 1,
"allow_guest_to_view": 0, "creation": "2013-01-10 16:34:15",
"allow_import": 0, "doctype": "DocType",
"allow_rename": 0, "field_order": [
"beta": 0, "select_employees_section",
"creation": "2013-01-10 16:34:15", "company",
"custom": 0, "employment_type",
"docstatus": 0, "branch",
"doctype": "DocType", "column_break1",
"editable_grid": 0, "department",
"designation",
"employee_grade",
"employee",
"allocate_leaves_section",
"from_date",
"to_date",
"leave_policy",
"leave_type",
"carry_forward",
"no_of_days",
"allocate"
],
"fields": [ "fields": [
{ {
"allow_bulk_edit": 0, "fieldname": "company",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Company",
"collapsible": 0, "options": "Company"
"columns": 0, },
"fieldname": "company",
"fieldtype": "Link",
"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": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"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, "fieldname": "employment_type",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Employment Type (optional)",
"columns": 0, "options": "Employment Type"
"description": "Leave blank if considered for all employee types", },
"fieldname": "employment_type",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Employment Type",
"length": 0,
"no_copy": 0,
"options": "Employment Type",
"permlevel": 0,
"print_hide": 0,
"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, "fieldname": "branch",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Branch (optional)",
"columns": 0, "options": "Branch"
"description": "Leave blank if considered for all branches", },
"fieldname": "branch",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Branch",
"length": 0,
"no_copy": 0,
"options": "Branch",
"permlevel": 0,
"print_hide": 0,
"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, "fieldname": "department",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Department (optional)",
"columns": 0, "options": "Department"
"description": "Leave blank if considered for all departments", },
"fieldname": "department",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Department",
"length": 0,
"no_copy": 0,
"options": "Department",
"permlevel": 0,
"print_hide": 0,
"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, "fieldname": "designation",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "in_list_view": 1,
"collapsible": 0, "label": "Designation (optional)",
"columns": 0, "options": "Designation"
"description": "Leave blank if considered for all designations", },
"fieldname": "designation",
"fieldtype": "Link",
"hidden": 0,
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Designation",
"length": 0,
"no_copy": 0,
"options": "Designation",
"permlevel": 0,
"print_hide": 0,
"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, "fieldname": "employee_grade",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Employee Grade (optional)",
"collapsible": 0, "options": "Employee Grade"
"columns": 0, },
"fieldname": "employee_grade",
"fieldtype": "Link",
"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": "Employee Grade",
"length": 0,
"no_copy": 0,
"options": "Employee Grade",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"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, "fieldname": "employee",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Employee (optional)",
"collapsible": 0, "options": "Employee"
"columns": 0, },
"fieldname": "employee",
"fieldtype": "Link",
"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": "Employee",
"length": 0,
"no_copy": 0,
"options": "Employee",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"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, "fieldname": "column_break1",
"allow_on_submit": 0, "fieldtype": "Column Break",
"bold": 0,
"collapsible": 0,
"columns": 0,
"fieldname": "column_break1",
"fieldtype": "Column Break",
"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,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"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,
"width": "50%" "width": "50%"
}, },
{ {
"allow_bulk_edit": 0, "fieldname": "from_date",
"allow_on_submit": 0, "fieldtype": "Date",
"bold": 0, "label": "From Date",
"collapsible": 0, "reqd": 1
"columns": 0, },
"fieldname": "from_date",
"fieldtype": "Date",
"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": "From Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "to_date",
"allow_on_submit": 0, "fieldtype": "Date",
"bold": 0, "label": "To Date",
"collapsible": 0, "reqd": 1
"columns": 0, },
"fieldname": "to_date",
"fieldtype": "Date",
"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": "To Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "leave_policy",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Leave Policy",
"collapsible": 0, "options": "Leave Policy"
"columns": 0, },
"fieldname": "leave_policy",
"fieldtype": "Link",
"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": "Leave Policy",
"length": 0,
"no_copy": 0,
"options": "Leave Policy",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"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, "fieldname": "leave_type",
"allow_on_submit": 0, "fieldtype": "Link",
"bold": 0, "label": "Leave Type",
"collapsible": 0, "options": "Leave Type"
"columns": 0, },
"fieldname": "leave_type",
"fieldtype": "Link",
"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": "Leave Type",
"length": 0,
"no_copy": 0,
"options": "Leave Type",
"permlevel": 0,
"print_hide": 0,
"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, "default": "0",
"allow_on_submit": 0, "description": "Please select Carry Forward if you also want to include previous fiscal year's balance leaves to this fiscal year",
"bold": 0, "fieldname": "carry_forward",
"collapsible": 0, "fieldtype": "Check",
"columns": 0, "label": "Carry Forward"
"description": "Please select Carry Forward if you also want to include previous fiscal year's balance leaves to this fiscal year", },
"fieldname": "carry_forward",
"fieldtype": "Check",
"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": "Carry Forward",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"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, "fieldname": "no_of_days",
"allow_on_submit": 0, "fieldtype": "Float",
"bold": 0, "label": "New Leaves Allocated (In Days)",
"collapsible": 0, "reqd": 1
"columns": 0, },
"fieldname": "no_of_days",
"fieldtype": "Float",
"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": "New Leaves Allocated (In Days)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"remember_last_selected_value": 0,
"report_hide": 0,
"reqd": 1,
"search_index": 0,
"set_only_once": 0,
"translatable": 0,
"unique": 0
},
{ {
"allow_bulk_edit": 0, "fieldname": "allocate",
"allow_on_submit": 0, "fieldtype": "Button",
"bold": 0, "label": "Allocate",
"collapsible": 0, "options": "allocate_leave"
"columns": 0, },
"fieldname": "allocate", {
"fieldtype": "Button", "fieldname": "select_employees_section",
"hidden": 0, "fieldtype": "Section Break",
"ignore_user_permissions": 0, "label": "Select Employees"
"ignore_xss_filter": 0, },
"in_filter": 0, {
"in_global_search": 0, "fieldname": "allocate_leaves_section",
"in_list_view": 0, "fieldtype": "Section Break",
"in_standard_filter": 0, "label": "Allocate Leaves"
"label": "Allocate",
"length": 0,
"no_copy": 0,
"options": "allocate_leave",
"permlevel": 0,
"print_hide": 0,
"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
} }
], ],
"has_web_view": 0, "hide_toolbar": 1,
"hide_heading": 0, "icon": "fa fa-cog",
"hide_toolbar": 1, "idx": 1,
"icon": "fa fa-cog", "issingle": 1,
"idx": 1, "modified": "2019-05-24 09:41:34.105741",
"image_view": 0, "modified_by": "Administrator",
"in_create": 0, "module": "HR",
"is_submittable": 0, "name": "Leave Control Panel",
"issingle": 1, "owner": "Administrator",
"istable": 0,
"max_attachments": 0,
"modified": "2018-04-13 16:17:15.115389",
"modified_by": "Administrator",
"module": "HR",
"name": "Leave Control Panel",
"owner": "Administrator",
"permissions": [ "permissions": [
{ {
"amend": 0, "create": 1,
"cancel": 0, "read": 1,
"create": 1, "role": "HR User",
"delete": 0,
"email": 0,
"export": 0,
"if_owner": 0,
"import": 0,
"permlevel": 0,
"print": 0,
"read": 1,
"report": 0,
"role": "HR User",
"set_user_permissions": 0,
"share": 0,
"submit": 0,
"write": 1 "write": 1
} }
], ],
"quick_entry": 0, "read_only": 1,
"read_only": 1, "sort_field": "modified",
"read_only_onload": 0, "sort_order": "DESC"
"show_name_in_global_search": 0,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 0,
"track_seen": 0
} }

View File

@ -199,7 +199,7 @@ frappe.ui.form.on('Production Plan', {
download_materials_required: function(frm) { download_materials_required: function(frm) {
let get_template_url = 'erpnext.manufacturing.doctype.production_plan.production_plan.download_raw_materials'; let get_template_url = 'erpnext.manufacturing.doctype.production_plan.production_plan.download_raw_materials';
open_url_post(frappe.request.url, { cmd: get_template_url, name: frm.doc.name }); open_url_post(frappe.request.url, { cmd: get_template_url, production_plan: frm.doc.name });
}, },
show_progress: function(frm) { show_progress: function(frm) {

View File

@ -428,7 +428,7 @@ def download_raw_materials(production_plan):
item_list.append(['', '', '', '', bin_dict.get('warehouse'), item_list.append(['', '', '', '', bin_dict.get('warehouse'),
bin_dict.get('projected_qty'), bin_dict.get('actual_qty')]) bin_dict.get('projected_qty'), bin_dict.get('actual_qty')])
build_csv_response(item_list) build_csv_response(item_list, doc.name)
def get_exploded_items(item_details, company, bom_no, include_non_stock_items, planned_qty=1): def get_exploded_items(item_details, company, bom_no, include_non_stock_items, planned_qty=1):
for d in frappe.db.sql("""select bei.item_code, item.default_bom as bom, for d in frappe.db.sql("""select bei.item_code, item.default_bom as bom,

View File

@ -93,4 +93,4 @@ cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
] ]
} }
} }
}l };

File diff suppressed because it is too large Load Diff