Merge branch 'develop' into upload-attendance-progress
diff --git a/erpnext/accounts/doctype/journal_entry/journal_entry.js b/erpnext/accounts/doctype/journal_entry/journal_entry.js
index 3ac677e..9be30aa 100644
--- a/erpnext/accounts/doctype/journal_entry/journal_entry.js
+++ b/erpnext/accounts/doctype/journal_entry/journal_entry.js
@@ -354,9 +354,7 @@
cur_frm.cscript.get_balance = function(doc,dt,dn) {
cur_frm.cscript.update_totals(doc);
- return $c_obj(cur_frm.doc, 'get_balance', '', function(r, rt){
- cur_frm.refresh();
- });
+ cur_frm.call('get_balance', null, () => { cur_frm.refresh(); });
}
cur_frm.cscript.validate = function(doc,cdt,cdn) {
diff --git a/erpnext/config/support.py b/erpnext/config/support.py
index c19dd42..47dc53e 100644
--- a/erpnext/config/support.py
+++ b/erpnext/config/support.py
@@ -56,6 +56,19 @@
]
},
{
+ "label": _("Maintenance"),
+ "items": [
+ {
+ "type": "doctype",
+ "name": "Maintenance Schedule",
+ },
+ {
+ "type": "doctype",
+ "name": "Maintenance Visit",
+ },
+ ]
+ },
+ {
"label": _("Reports"),
"icon": "fa fa-list",
"items": [
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index 78ff339..967459f 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -115,13 +115,15 @@
if(!this.frm.doc.enquiry_from && this.frm.doc.lead)
this.frm.doc.enquiry_from = "Lead";
- if(!this.frm.doc.status)
- set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Open' });
- if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
- set_multiple(this.frm.doc.doctype, this.frm.doc.name,
- { company:frappe.defaults.get_user_default("Company") });
- if(!this.frm.doc.currency)
- set_multiple(this.frm.doc.doctype, this.frm.doc.name, { currency:frappe.defaults.get_user_default("Currency") });
+ if(!this.frm.doc.status) {
+ frm.set_value('status', 'Open');
+ }
+ if(!this.frm.doc.company && frappe.defaults.get_user_default("Company")) {
+ frm.set_value('company', frappe.defaults.get_user_default("Company"));
+ }
+ if(!this.frm.doc.currency) {
+ frm.set_value('currency', frappe.defaults.get_user_default("Currency"));
+ }
this.setup_queries();
},
diff --git a/erpnext/hr/doctype/appraisal/appraisal.js b/erpnext/hr/doctype/appraisal/appraisal.js
index 30317d9..a71486a 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.js
+++ b/erpnext/hr/doctype/appraisal/appraisal.js
@@ -1,77 +1,54 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-cur_frm.add_fetch('employee', 'company', 'company');
-cur_frm.add_fetch('employee', 'employee_name', 'employee_name');
-
-cur_frm.cscript.onload = function(doc,cdt,cdn){
- if(!doc.status)
- set_multiple(cdt,cdn,{status:'Draft'});
- if(doc.amended_from && doc.__islocal) {
- doc.status = "Draft";
- }
-}
-
-cur_frm.cscript.onload_post_render = function(doc,cdt,cdn){
- if(doc.__islocal && doc.employee==frappe.defaults.get_user_default("Employee")) {
- cur_frm.set_value("employee", "");
- cur_frm.set_value("employee_name", "")
- }
-}
-
-cur_frm.cscript.refresh = function(doc,cdt,cdn){
-
-}
-
-cur_frm.cscript.kra_template = function(doc, dt, dn) {
- doc.goals = [];
- erpnext.utils.map_current_doc({
- method: "erpnext.hr.doctype.appraisal.appraisal.fetch_appraisal_template",
- source_name: cur_frm.doc.kra_template,
- frm: cur_frm
- });
-}
-
-cur_frm.cscript.calculate_total_score = function(doc,cdt,cdn){
- //return get_server_fields('calculate_total','','',doc,cdt,cdn,1);
- var val = doc.goals || [];
- var total =0;
- for(var i = 0; i<val.length; i++){
- total = flt(total)+flt(val[i].score_earned)
- }
- doc.total_score = flt(total)
- refresh_field('total_score')
-}
-
-cur_frm.cscript.score = function(doc,cdt,cdn){
- var d = locals[cdt][cdn];
- if (d.score){
- if (flt(d.score) > 5) {
- frappe.msgprint(__("Score must be less than or equal to 5"));
- d.score = 0;
- refresh_field('score', d.name, 'goals');
+frappe.ui.form.on('Appraisal', {
+ setup: function(frm) {
+ frm.add_fetch('employee', 'company', 'company');
+ frm.add_fetch('employee', 'employee_name', 'employee_name');
+ frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
+ return{ query: "erpnext.controllers.queries.employee_query" }
+ };
+ },
+ onload: function(frm) {
+ if(!frm.doc.status) {
+ frm.set_value('status', 'Draft');
}
- var total = flt(d.per_weightage*d.score)/100;
- d.score_earned = total.toPrecision(2);
- refresh_field('score_earned', d.name, 'goals');
+ },
+ kra_template: function(frm) {
+ frm.doc.goals = [];
+ erpnext.utils.map_current_doc({
+ method: "erpnext.hr.doctype.appraisal.appraisal.fetch_appraisal_template",
+ source_name: frm.doc.kra_template,
+ frm: frm
+ });
+ },
+ calculate_total: function(frm) {
+ let goals = frm.doc.goals || [];
+ let total =0;
+ for(let i = 0; i<goals.length; i++){
+ total = flt(total)+flt(goals[i].score_earned)
+ }
+ frm.set_value('total_score', total);
}
- else{
- d.score_earned = 0;
- refresh_field('score_earned', d.name, 'goals');
- }
- cur_frm.cscript.calculate_total(doc,cdt,cdn);
-}
+});
-cur_frm.cscript.calculate_total = function(doc,cdt,cdn){
- var val = doc.goals || [];
- var total =0;
- for(var i = 0; i<val.length; i++){
- total = flt(total)+flt(val[i].score_earned);
+frappe.ui.form.on('Appraisal Goal', {
+ score: function(frm, cdt, cdn) {
+ var d = locals[cdt][cdn];
+ if (d.score){
+ if (flt(d.score) > 5) {
+ frappe.msgprint(__("Score must be less than or equal to 5"));
+ d.score = 0;
+ refresh_field('score', d.name, 'goals');
+ }
+ var total = flt(d.per_weightage*d.score)/100;
+ d.score_earned = total.toPrecision(2);
+ refresh_field('score_earned', d.name, 'goals');
+ }
+ else{
+ d.score_earned = 0;
+ refresh_field('score_earned', d.name, 'goals');
+ }
+ frm.trigger('calculate_total');
}
- doc.total_score = flt(total);
- refresh_field('total_score');
-}
-
-cur_frm.fields_dict.employee.get_query = function(doc,cdt,cdn) {
- return{ query: "erpnext.controllers.queries.employee_query" }
-}
+});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
index 7aeb8ea..b60e225 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
@@ -1,32 +1,15 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-cur_frm.cscript.onload = function (doc, dt, dn) {
- if (!doc.posting_date)
- set_multiple(dt, dn, { posting_date: frappe.datetime.get_today() });
- if (!doc.leave_transaction_type)
- set_multiple(dt, dn, { leave_transaction_type: 'Allocation' });
-}
-
-cur_frm.cscript.to_date = function (doc, cdt, cdn) {
- return $c('runserverobj', { 'method': 'to_date_validation', 'docs': doc },
- function (r, rt) {
- var doc = locals[cdt][cdn];
- if (r.message) {
- frappe.msgprint(__("To date cannot be before from date"));
- doc.to_date = '';
- refresh_field('to_date');
- }
- }
- );
-}
-
-cur_frm.cscript.allocation_type = function (doc, cdt, cdn) {
- doc.no_of_days = '';
- refresh_field('no_of_days');
-}
-
frappe.ui.form.on("Leave Control Panel", {
+ onload: function(frm) {
+ if (!frm.doc.from_date) {
+ frm.set_value('from_date', frappe.datetime.get_today());
+ }
+ },
+ refresh: function(frm) {
+ frm.disable_save();
+ },
company: function(frm) {
if(frm.doc.company) {
frm.set_query("department", function() {
@@ -37,8 +20,5 @@
};
});
}
- },
- refresh: function(frm) {
- frm.disable_save();
}
});
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json
index 96a4681..39985fa 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.json
@@ -1,530 +1,150 @@
{
- "allow_copy": 1,
- "allow_guest_to_view": 0,
- "allow_import": 0,
- "allow_rename": 0,
- "beta": 0,
- "creation": "2013-01-10 16:34:15",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "editable_grid": 0,
+ "allow_copy": 1,
+ "creation": "2013-01-10 16:34:15",
+ "doctype": "DocType",
+ "field_order": [
+ "select_employees_section",
+ "company",
+ "employment_type",
+ "branch",
+ "column_break1",
+ "department",
+ "designation",
+ "employee_grade",
+ "employee",
+ "allocate_leaves_section",
+ "from_date",
+ "to_date",
+ "leave_policy",
+ "leave_type",
+ "carry_forward",
+ "no_of_days",
+ "allocate"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "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
- },
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "label": "Company",
+ "options": "Company"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "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
- },
+ "fieldname": "employment_type",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Employment Type (optional)",
+ "options": "Employment Type"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "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
- },
+ "fieldname": "branch",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Branch (optional)",
+ "options": "Branch"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "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
- },
+ "fieldname": "department",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Department (optional)",
+ "options": "Department"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "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
- },
+ "fieldname": "designation",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "label": "Designation (optional)",
+ "options": "Designation"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "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
- },
+ "fieldname": "employee_grade",
+ "fieldtype": "Link",
+ "label": "Employee Grade (optional)",
+ "options": "Employee Grade"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "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
- },
+ "fieldname": "employee",
+ "fieldtype": "Link",
+ "label": "Employee (optional)",
+ "options": "Employee"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "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,
+ "fieldname": "column_break1",
+ "fieldtype": "Column Break",
"width": "50%"
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "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
- },
+ "fieldname": "from_date",
+ "fieldtype": "Date",
+ "label": "From Date",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "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
- },
+ "fieldname": "to_date",
+ "fieldtype": "Date",
+ "label": "To Date",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "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
- },
+ "fieldname": "leave_policy",
+ "fieldtype": "Link",
+ "label": "Leave Policy",
+ "options": "Leave Policy"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "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
- },
+ "fieldname": "leave_type",
+ "fieldtype": "Link",
+ "label": "Leave Type",
+ "options": "Leave Type"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "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
- },
+ "default": "0",
+ "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",
+ "label": "Carry Forward"
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "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
- },
+ "fieldname": "no_of_days",
+ "fieldtype": "Float",
+ "label": "New Leaves Allocated (In Days)",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "allocate",
- "fieldtype": "Button",
- "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": "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
+ "fieldname": "allocate",
+ "fieldtype": "Button",
+ "label": "Allocate",
+ "options": "allocate_leave"
+ },
+ {
+ "fieldname": "select_employees_section",
+ "fieldtype": "Section Break",
+ "label": "Select Employees"
+ },
+ {
+ "fieldname": "allocate_leaves_section",
+ "fieldtype": "Section Break",
+ "label": "Allocate Leaves"
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 1,
- "icon": "fa fa-cog",
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 1,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2018-04-13 16:17:15.115389",
- "modified_by": "Administrator",
- "module": "HR",
- "name": "Leave Control Panel",
- "owner": "Administrator",
+ ],
+ "hide_toolbar": 1,
+ "icon": "fa fa-cog",
+ "idx": 1,
+ "issingle": 1,
+ "modified": "2019-05-24 09:41:34.105741",
+ "modified_by": "Administrator",
+ "module": "HR",
+ "name": "Leave Control Panel",
+ "owner": "Administrator",
"permissions": [
{
- "amend": 0,
- "cancel": 0,
- "create": 1,
- "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,
+ "create": 1,
+ "read": 1,
+ "role": "HR User",
"write": 1
}
- ],
- "quick_entry": 0,
- "read_only": 1,
- "read_only_onload": 0,
- "show_name_in_global_search": 0,
- "sort_field": "modified",
- "sort_order": "DESC",
- "track_changes": 0,
- "track_seen": 0
+ ],
+ "read_only": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC"
}
\ No newline at end of file
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
index 098002d..57e61b5 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
@@ -27,10 +27,7 @@
for f in ["from_date", "to_date", "leave_type", "no_of_days"]:
if not self.get(f):
frappe.throw(_("{0} is required").format(self.meta.get_label(f)))
-
- def to_date_validation(self):
- if date_diff(self.to_date, self.from_date) <= 0:
- return "Invalid period"
+ self.validate_from_to_dates('from_date', 'to_date')
def allocate_leave(self):
self.validate_values()
diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
index 79f9e63..ce95db3 100644
--- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.js
@@ -7,6 +7,18 @@
setup: function(frm) {
frm.set_query('contact_person', erpnext.queries.contact_query);
frm.set_query('customer_address', erpnext.queries.address_query);
+ frm.set_query('customer', erpnext.queries.customer);
+
+ frm.add_fetch('item_code', 'item_name', 'item_name');
+ frm.add_fetch('item_code', 'description', 'description');
+ },
+ onload: function(frm) {
+ if (!frm.doc.status) {
+ frm.set_value({status:'Draft'});
+ }
+ if (frm.doc.__islocal) {
+ frm.set_value({transaction_date: frappe.datetime.get_today()});
+ }
},
customer: function(frm) {
erpnext.utils.get_party_details(frm)
@@ -16,8 +28,14 @@
},
contact_person: function(frm) {
erpnext.utils.get_contact_details(frm);
+ },
+ generate_schedule: function(frm) {
+ if (frm.is_new()) {
+ frappe.msgprint(__('Please save first'));
+ } else {
+ frm.call('generate_schedule');
+ }
}
-
})
// TODO commonify this code
@@ -93,30 +111,3 @@
$.extend(cur_frm.cscript, new erpnext.maintenance.MaintenanceSchedule({frm: cur_frm}));
-cur_frm.cscript.onload = function(doc, dt, dn) {
- if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
-
- if(doc.__islocal){
- set_multiple(dt,dn,{transaction_date: frappe.datetime.get_today()});
- }
-
- // set add fetch for item_code's item_name and description
- cur_frm.add_fetch('item_code', 'item_name', 'item_name');
- cur_frm.add_fetch('item_code', 'description', 'description');
-
-}
-
-cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) {
- if (!doc.__islocal) {
- return $c('runserverobj', {'method':'generate_schedule', 'docs':doc},
- function(r, rt) {
- refresh_field('schedules');
- });
- } else {
- frappe.msgprint(__("Please save the document before generating maintenance schedule"));
- }
-}
-
-cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
- return { query: "erpnext.controllers.queries.customer_query" }
-}
diff --git a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js
index a4f3abc..f3fc011 100644
--- a/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/maintenance/doctype/maintenance_visit/maintenance_visit.js
@@ -7,9 +7,18 @@
setup: function(frm) {
frm.set_query('contact_person', erpnext.queries.contact_query);
frm.set_query('customer_address', erpnext.queries.address_query);
+ frm.set_query('customer', erpnext.queries.customer);
+ },
+ onload: function(frm) {
+ if (!frm.doc.status) {
+ frm.set_value({status:'Draft'});
+ }
+ if (frm.doc.__islocal) {
+ frm.set_value({mntc_date: frappe.datetime.get_today()});
+ }
},
customer: function(frm) {
- erpnext.utils.get_party_details(frm)
+ erpnext.utils.get_party_details(frm);
},
customer_address: function(frm) {
erpnext.utils.get_address_display(frm, 'customer_address', 'address_display');
@@ -79,17 +88,4 @@
},
});
-$.extend(cur_frm.cscript, new erpnext.maintenance.MaintenanceVisit({frm: cur_frm}));
-
-cur_frm.cscript.onload = function(doc, dt, dn) {
- if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
- if(doc.__islocal) set_multiple(dt,dn,{mntc_date: frappe.datetime.get_today()});
-
- // set add fetch for item_code's item_name and description
- cur_frm.add_fetch('item_code', 'item_name', 'item_name');
- cur_frm.add_fetch('item_code', 'description', 'description');
-}
-
-cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
- return {query: "erpnext.controllers.queries.customer_query" }
-}
+$.extend(cur_frm.cscript, new erpnext.maintenance.MaintenanceVisit({frm: cur_frm}));
\ No newline at end of file
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.js b/erpnext/manufacturing/doctype/production_plan/production_plan.js
index 58fc29e..53a8b80 100644
--- a/erpnext/manufacturing/doctype/production_plan/production_plan.js
+++ b/erpnext/manufacturing/doctype/production_plan/production_plan.js
@@ -198,7 +198,8 @@
},
download_materials_required: function(frm) {
- $c_obj_csv(frm.doc, '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, production_plan: frm.doc.name });
},
show_progress: function(frm) {
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py
index 18ca9cc..ba1c4e7 100644
--- a/erpnext/manufacturing/doctype/production_plan/production_plan.py
+++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py
@@ -5,11 +5,13 @@
from __future__ import unicode_literals
import frappe, json
from frappe import msgprint, _
-from frappe.model.document import Document
-from erpnext.manufacturing.doctype.bom.bom import validate_bom_no, get_children
-from frappe.utils import cstr, flt, cint, nowdate, add_days, comma_and, now_datetime, ceil
-from erpnext.manufacturing.doctype.work_order.work_order import get_item_details
from six import string_types, iteritems
+
+from frappe.model.document import Document
+from frappe.utils import cstr, flt, cint, nowdate, add_days, comma_and, now_datetime, ceil
+from frappe.utils.csvutils import build_csv_response
+from erpnext.manufacturing.doctype.bom.bom import validate_bom_no, get_children
+from erpnext.manufacturing.doctype.work_order.work_order import get_item_details
from erpnext.setup.doctype.item_group.item_group import get_item_group_defaults
class ProductionPlan(Document):
@@ -404,25 +406,29 @@
else :
msgprint(_("No material request created"))
- def download_raw_materials(self):
- item_list = [['Item Code', 'Description', 'Stock UOM', 'Required Qty', 'Warehouse',
- 'projected Qty', 'Actual Qty']]
+@frappe.whitelist()
+def download_raw_materials(production_plan):
+ doc = frappe.get_doc('Production Plan', production_plan)
+ doc.check_permission()
- doc = self.as_dict()
- for d in get_items_for_material_requests(doc, ignore_existing_ordered_qty=True):
- item_list.append([d.get('item_code'), d.get('description'), d.get('stock_uom'), d.get('quantity'),
- d.get('warehouse'), d.get('projected_qty'), d.get('actual_qty')])
+ item_list = [['Item Code', 'Description', 'Stock UOM', 'Required Qty', 'Warehouse',
+ 'projected Qty', 'Actual Qty']]
- if not self.for_warehouse:
- row = {'item_code': d.get('item_code')}
- for bin_dict in get_bin_details(row, self.company, all_warehouse=True):
- if d.get("warehouse") == bin_dict.get('warehouse'):
- continue
+ doc = doc.as_dict()
+ for d in get_items_for_material_requests(doc, ignore_existing_ordered_qty=True):
+ item_list.append([d.get('item_code'), d.get('description'), d.get('stock_uom'), d.get('quantity'),
+ d.get('warehouse'), d.get('projected_qty'), d.get('actual_qty')])
- item_list.append(['', '', '', '', bin_dict.get('warehouse'),
- bin_dict.get('projected_qty'), bin_dict.get('actual_qty')])
+ if not doc.for_warehouse:
+ row = {'item_code': d.get('item_code')}
+ for bin_dict in get_bin_details(row, doc.company, all_warehouse=True):
+ if d.get("warehouse") == bin_dict.get('warehouse'):
+ continue
- return item_list
+ item_list.append(['', '', '', '', bin_dict.get('warehouse'),
+ bin_dict.get('projected_qty'), bin_dict.get('actual_qty')])
+
+ build_csv_response(item_list, doc.name)
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,
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index 9a8af69..1f609d7 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -60,13 +60,6 @@
};
},
- project: function(frm) {
- if(frm.doc.project) {
- return get_server_fields('get_project_details', '','', frm.doc, frm.doc.doctype,
- frm.doc.name, 1);
- }
- },
-
is_group: function (frm) {
frappe.call({
method: "erpnext.projects.doctype.task.task.check_if_child_exists",
diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py
index fa9a5a5..b5e4ff8 100755
--- a/erpnext/projects/doctype/task/task.py
+++ b/erpnext/projects/doctype/task/task.py
@@ -20,11 +20,6 @@
def get_feed(self):
return '{0}: {1}'.format(_(self.status), self.subject)
- def get_project_details(self):
- return {
- "project": self.project
- }
-
def get_customer_details(self):
cust = frappe.db.sql("select customer_name from `tabCustomer` where name=%s", self.customer)
if cust:
diff --git a/erpnext/selling/doctype/installation_note/installation_note.js b/erpnext/selling/doctype/installation_note/installation_note.js
index 9f0c050..a8d9ae8 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.js
+++ b/erpnext/selling/doctype/installation_note/installation_note.js
@@ -1,46 +1,36 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-
-
-frappe.ui.form.on_change("Installation Note", "customer",
- function(frm) { erpnext.utils.get_party_details(frm); });
-
-frappe.ui.form.on_change("Installation Note", "customer_address",
- function(frm) { erpnext.utils.get_address_display(frm); });
-
-frappe.ui.form.on_change("Installation Note", "contact_person",
- function(frm) { erpnext.utils.get_contact_details(frm); });
-
-frappe.provide("erpnext.selling");
-// TODO commonify this code
-erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({
- onload: function() {
- if(!this.frm.doc.status) {
- set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Draft'});
- }
- if(this.frm.doc.__islocal) {
- set_multiple(this.frm.doc.doctype, this.frm.doc.name,
- {inst_date: frappe.datetime.get_today()});
- }
-
- this.setup_queries();
- },
-
- setup_queries: function() {
- var me = this;
-
+frappe.ui.form.on('Installation Note', {
+ setup: function(frm) {
frappe.dynamic_link = {doc: this.frm.doc, fieldname: 'customer', doctype: 'Customer'}
frm.set_query('customer_address', erpnext.queries.address_query);
- this.frm.set_query('contact_person', erpnext.queries.contact_query);
-
- this.frm.set_query("customer", function() {
- return {
- query: "erpnext.controllers.queries.customer_query"
- }
- });
+ frm.set_query('contact_person', erpnext.queries.contact_query);
+ frm.set_query('customer', erpnext.queries.customer);
},
+ onload: function(frm) {
+ if(!frm.doc.status) {
+ frm.set_value({ status:'Draft'});
+ }
+ if(frm.doc.__islocal) {
+ frm.set_value({inst_date: frappe.datetime.get_today()});
+ }
+ },
+ customer: function(frm) {
+ erpnext.utils.get_party_details(frm);
+ },
+ customer_address: function(frm) {
+ erpnext.utils.get_address_display(frm);
+ },
+ contact_person: function(frm) {
+ erpnext.utils.get_contact_details(frm);
+ }
+});
+frappe.provide("erpnext.selling");
+
+// TODO commonify this code
+erpnext.selling.InstallationNote = frappe.ui.form.Controller.extend({
refresh: function() {
var me = this;
if (this.frm.doc.docstatus===0) {
diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js
index 308b8ed..1218dd3 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.js
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -573,7 +573,7 @@
function get_frm(_frm) {
const page = $('<div>');
- const frm = _frm || new _f.Frm(doctype, page, false);
+ const frm = _frm || new frappe.ui.form.Form(doctype, page, false);
const name = frappe.model.make_new_doc_and_get_name(doctype, true);
frm.refresh(name);
frm.doc.items = [];
diff --git a/erpnext/setup/doctype/email_digest/email_digest.js b/erpnext/setup/doctype/email_digest/email_digest.js
index fcd0b0e..1071ea2 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.js
+++ b/erpnext/setup/doctype/email_digest/email_digest.js
@@ -3,9 +3,6 @@
cur_frm.cscript.refresh = function(doc, dt, dn) {
doc = locals[dt][dn];
- var save_msg = __("You must Save the form before proceeding");
- var err_msg = __("There was an error. One probable reason could be that you haven't saved the form. Please contact support@erpnext.com if the problem persists.")
-
cur_frm.add_custom_button(__('View Now'), function() {
frappe.call({
method: 'erpnext.setup.doctype.email_digest.email_digest.get_digest_msg',
@@ -23,61 +20,47 @@
});
}, "fa fa-eye-open", "btn-default");
- if(frappe.session.user==="Administrator") {
+ if (!cur_frm.is_new()) {
cur_frm.add_custom_button(__('Send Now'), function() {
- doc = locals[dt][dn];
- if(doc.__unsaved != 1) {
- return $c_obj(doc, 'send', '', function(r, rt) {
- if(r.exc) {
- frappe.msgprint(err_msg);
- console.log(r.exc);
- } else {
- //console.log(arguments);
- frappe.msgprint(__('Message Sent'));
- }
- });
- } else {
- frappe.msgprint(save_msg);
- }
- }, "fa fa-envelope", "btn-default");
+ return cur_frm.call('send', null, (r) => {
+ frappe.show_alert(__('Message Sent'));
+ });
+ });
}
-}
+};
cur_frm.cscript.addremove_recipients = function(doc, dt, dn) {
// Get user list
- return $c_obj(doc, 'get_users', '', function(r, rt) {
- if(r.exc) {
- frappe.msgprint(r.exc);
- } else {
- // Open a dialog and display checkboxes against email addresses
- doc = locals[dt][dn];
- var d = new frappe.ui.Dialog({
- title: __('Add/Remove Recipients'),
- width: 400
- });
- $.each(r.user_list, function(i, v) {
- var fullname = frappe.user.full_name(v.name);
- if(fullname !== v.name) fullname = fullname + " <" + v.name + ">";
+ return cur_frm.call('get_users', null, function(r) {
+ // Open a dialog and display checkboxes against email addresses
+ doc = locals[dt][dn];
+ var d = new frappe.ui.Dialog({
+ title: __('Add/Remove Recipients'),
+ width: 400
+ });
- if(v.enabled==0) {
- fullname = repl("<span style='color: red'> %(name)s (" + __("disabled user") + ")</span>", {name: v.name});
- }
+ $.each(r.user_list, function(i, v) {
+ var fullname = frappe.user.full_name(v.name);
+ if(fullname !== v.name) fullname = fullname + " <" + v.name + ">";
- $('<div class="checkbox"><label>\
- <input type="checkbox" data-id="' + v.name + '"'+
- (v.checked ? 'checked' : '') +
- '> '+ fullname +'</label></div>').appendTo(d.body);
- });
+ if(v.enabled==0) {
+ fullname = repl("<span style='color: red'> %(name)s (" + __("disabled user") + ")</span>", {name: v.name});
+ }
- // Display add recipients button
- d.set_primary_action("Update", function() {
- cur_frm.cscript.add_to_rec_list(doc, d.body, r.user_list.length);
- });
+ $('<div class="checkbox"><label>\
+ <input type="checkbox" data-id="' + v.name + '"'+
+ (v.checked ? 'checked' : '') +
+ '> '+ fullname +'</label></div>').appendTo(d.body);
+ });
- cur_frm.rec_dialog = d;
- d.show();
- }
+ // Display add recipients button
+ d.set_primary_action("Update", function() {
+ cur_frm.cscript.add_to_rec_list(doc, d.body, r.user_list.length);
+ });
+
+ cur_frm.rec_dialog = d;
+ d.show();
});
}
diff --git a/erpnext/setup/doctype/global_defaults/global_defaults.js b/erpnext/setup/doctype/global_defaults/global_defaults.js
index 58b8c51..552331a 100644
--- a/erpnext/setup/doctype/global_defaults/global_defaults.js
+++ b/erpnext/setup/doctype/global_defaults/global_defaults.js
@@ -1,17 +1,15 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
-$.extend(cur_frm.cscript, {
- onload: function (doc, cdt, cdn) {
- cur_frm.trigger("get_distance_uoms");
+frappe.ui.form.on('Global Defaults', {
+ onload: function(frm) {
+ frm.trigger('get_distance_uoms');
},
-
- validate: function (doc, cdt, cdn) {
- return $c_obj(doc, 'get_defaults', '', function (r, rt) {
+ validate: function(frm) {
+ frm.call('get_defaults', null, r => {
frappe.sys_defaults = r.message;
- });
+ })
},
-
get_distance_uoms: function (frm) {
let units = [];
@@ -27,9 +25,8 @@
r.message.forEach(row => units.push(row.to_uom));
}
});
-
- cur_frm.set_query("default_distance_unit", function (doc) {
+ frm.set_query("default_distance_unit", function () {
return { filters: { "name": ["IN", units] } };
- })
+ });
}
});
diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.js b/erpnext/support/doctype/warranty_claim/warranty_claim.js
index ac8eb8d..79f4675 100644
--- a/erpnext/support/doctype/warranty_claim/warranty_claim.js
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.js
@@ -7,6 +7,23 @@
setup: function(frm) {
frm.set_query('contact_person', erpnext.queries.contact_query);
frm.set_query('customer_address', erpnext.queries.address_query);
+ frm.set_query('customer', erpnext.queries.customer);
+
+ frm.add_fetch('serial_no', 'item_code', 'item_code');
+ frm.add_fetch('serial_no', 'item_name', 'item_name');
+ frm.add_fetch('serial_no', 'description', 'description');
+ frm.add_fetch('serial_no', 'maintenance_status', 'warranty_amc_status');
+ frm.add_fetch('serial_no', 'warranty_expiry_date', 'warranty_expiry_date');
+ frm.add_fetch('serial_no', 'amc_expiry_date', 'amc_expiry_date');
+ frm.add_fetch('serial_no', 'customer', 'customer');
+ frm.add_fetch('serial_no', 'customer_name', 'customer_name');
+ frm.add_fetch('item_code', 'item_name', 'item_name');
+ frm.add_fetch('item_code', 'description', 'description');
+ },
+ onload: function(frm) {
+ if(!frm.doc.status) {
+ frm.set_value('status', 'Open');
+ }
},
customer: function(frm) {
erpnext.utils.get_party_details(frm);
@@ -40,11 +57,6 @@
$.extend(cur_frm.cscript, new erpnext.support.WarrantyClaim({frm: cur_frm}));
-cur_frm.cscript.onload = function(doc,cdt,cdn){
- if(!doc.status)
- set_multiple(cdt,cdn,{status:'Open'});
-}
-
cur_frm.fields_dict['serial_no'].get_query = function(doc, cdt, cdn) {
var cond = [];
var filter = [
@@ -63,17 +75,6 @@
}
}
-cur_frm.add_fetch('serial_no', 'item_code', 'item_code');
-cur_frm.add_fetch('serial_no', 'item_name', 'item_name');
-cur_frm.add_fetch('serial_no', 'description', 'description');
-cur_frm.add_fetch('serial_no', 'maintenance_status', 'warranty_amc_status');
-cur_frm.add_fetch('serial_no', 'warranty_expiry_date', 'warranty_expiry_date');
-cur_frm.add_fetch('serial_no', 'amc_expiry_date', 'amc_expiry_date');
-cur_frm.add_fetch('serial_no', 'customer', 'customer');
-cur_frm.add_fetch('serial_no', 'customer_name', 'customer_name');
-cur_frm.add_fetch('item_code', 'item_name', 'item_name');
-cur_frm.add_fetch('item_code', 'description', 'description');
-
cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
if(doc.serial_no) {
return{
@@ -92,10 +93,4 @@
]
}
}
-}
-
-
-
-cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
- return{ query: "erpnext.controllers.queries.customer_query" } }
-
+};
\ No newline at end of file
diff --git a/erpnext/support/doctype/warranty_claim/warranty_claim.json b/erpnext/support/doctype/warranty_claim/warranty_claim.json
index 283db24..ae1a7a5 100644
--- a/erpnext/support/doctype/warranty_claim/warranty_claim.json
+++ b/erpnext/support/doctype/warranty_claim/warranty_claim.json
@@ -1,1319 +1,388 @@
{
- "allow_copy": 0,
- "allow_guest_to_view": 0,
- "allow_import": 1,
- "allow_rename": 0,
- "autoname": "naming_series:",
- "beta": 0,
- "creation": "2013-01-10 16:34:30",
- "custom": 0,
- "docstatus": 0,
- "doctype": "DocType",
- "document_type": "Setup",
- "editable_grid": 0,
+ "allow_import": 1,
+ "autoname": "naming_series:",
+ "creation": "2013-01-10 16:34:30",
+ "doctype": "DocType",
+ "document_type": "Setup",
+ "field_order": [
+ "naming_series",
+ "status",
+ "complaint_date",
+ "column_break0",
+ "customer",
+ "serial_no",
+ "section_break_7",
+ "complaint",
+ "issue_details",
+ "item_code",
+ "item_name",
+ "description",
+ "column_break1",
+ "warranty_amc_status",
+ "warranty_expiry_date",
+ "amc_expiry_date",
+ "resolution_section",
+ "resolution_date",
+ "resolved_by",
+ "resolution_details",
+ "contact_info",
+ "customer_name",
+ "contact_person",
+ "contact_display",
+ "contact_mobile",
+ "contact_email",
+ "territory",
+ "customer_group",
+ "col_break4",
+ "customer_address",
+ "address_display",
+ "service_address",
+ "more_info",
+ "company",
+ "col_break6",
+ "complaint_raised_by",
+ "from_company",
+ "amended_from"
+ ],
"fields": [
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "",
- "fieldname": "naming_series",
- "fieldtype": "Select",
- "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": "Series",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "naming_series",
- "oldfieldtype": "Select",
- "options": "SER-WRN-.YYYY.-",
- "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": 1,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "naming_series",
+ "fieldtype": "Select",
+ "label": "Series",
+ "no_copy": 1,
+ "oldfieldname": "naming_series",
+ "oldfieldtype": "Select",
+ "options": "SER-WRN-.YYYY.-",
+ "reqd": 1,
+ "set_only_once": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "Open",
- "fieldname": "status",
- "fieldtype": "Select",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 1,
- "in_standard_filter": 1,
- "label": "Status",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "status",
- "oldfieldtype": "Select",
- "options": "\nOpen\nClosed\nWork In Progress\nCancelled",
- "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": 1,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "default": "Open",
+ "fieldname": "status",
+ "fieldtype": "Select",
+ "in_list_view": 1,
+ "in_standard_filter": 1,
+ "label": "Status",
+ "no_copy": 1,
+ "oldfieldname": "status",
+ "oldfieldtype": "Select",
+ "options": "\nOpen\nClosed\nWork In Progress\nCancelled",
+ "reqd": 1,
+ "search_index": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "default": "Today",
- "fieldname": "complaint_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": "Issue Date",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "complaint_date",
- "oldfieldtype": "Date",
- "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": 1,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "default": "Today",
+ "fieldname": "complaint_date",
+ "fieldtype": "Date",
+ "label": "Issue Date",
+ "oldfieldname": "complaint_date",
+ "oldfieldtype": "Date",
+ "reqd": 1,
+ "search_index": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "column_break0",
- "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,
- "oldfieldtype": "Column Break",
- "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,
+ "fieldname": "column_break0",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
"width": "50%"
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "",
- "fieldname": "serial_no",
- "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": "Serial No",
- "length": 0,
- "no_copy": 0,
- "options": "Serial No",
- "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
- },
+ "fieldname": "serial_no",
+ "fieldtype": "Link",
+ "label": "Serial No",
+ "options": "Serial No"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "customer",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 1,
- "in_list_view": 0,
- "in_standard_filter": 1,
- "label": "Customer",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "customer",
- "oldfieldtype": "Link",
- "options": "Customer",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 1,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "customer",
+ "fieldtype": "Link",
+ "in_global_search": 1,
+ "in_standard_filter": 1,
+ "label": "Customer",
+ "oldfieldname": "customer",
+ "oldfieldtype": "Link",
+ "options": "Customer",
+ "print_hide": 1,
+ "reqd": 1,
+ "search_index": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "section_break_7",
- "fieldtype": "Section 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,
- "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
- },
+ "fieldname": "section_break_7",
+ "fieldtype": "Section Break"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "complaint",
- "fieldtype": "Text Editor",
- "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": "Issue",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "complaint",
- "oldfieldtype": "Small Text",
- "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
- },
+ "fieldname": "complaint",
+ "fieldtype": "Text Editor",
+ "label": "Issue",
+ "no_copy": 1,
+ "oldfieldname": "complaint",
+ "oldfieldtype": "Small Text",
+ "reqd": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "issue_details",
- "fieldtype": "Section 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,
- "label": "Item and Warranty Details",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "fa fa-ticket",
- "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
- },
+ "fieldname": "issue_details",
+ "fieldtype": "Section Break",
+ "label": "Item and Warranty Details",
+ "oldfieldtype": "Section Break",
+ "options": "fa fa-ticket"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "item_code",
- "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": 1,
- "label": "Item Code",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_code",
- "oldfieldtype": "Link",
- "options": "Item",
- "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": 1,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "item_code",
+ "fieldtype": "Link",
+ "in_list_view": 1,
+ "in_standard_filter": 1,
+ "label": "Item Code",
+ "oldfieldname": "item_code",
+ "oldfieldtype": "Link",
+ "options": "Item",
+ "search_index": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:doc.item_code",
- "fieldname": "item_name",
- "fieldtype": "Data",
- "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": "Item Name",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "item_name",
- "oldfieldtype": "Data",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "depends_on": "eval:doc.item_code",
+ "fieldname": "item_name",
+ "fieldtype": "Data",
+ "label": "Item Name",
+ "oldfieldname": "item_name",
+ "oldfieldtype": "Data",
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "eval:doc.item_code",
- "fieldname": "description",
- "fieldtype": "Small Text",
- "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": "Description",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "description",
- "oldfieldtype": "Small Text",
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0,
+ "depends_on": "eval:doc.item_code",
+ "fieldname": "description",
+ "fieldtype": "Small Text",
+ "label": "Description",
+ "oldfieldname": "description",
+ "oldfieldtype": "Small Text",
+ "read_only": 1,
"width": "300px"
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "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,
- "oldfieldtype": "Column Break",
- "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,
+ "fieldname": "column_break1",
+ "fieldtype": "Column Break",
+ "oldfieldtype": "Column Break",
"width": "50%"
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "warranty_amc_status",
- "fieldtype": "Select",
- "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": "Warranty / AMC Status",
- "length": 0,
- "no_copy": 0,
- "options": "\nUnder Warranty\nOut of Warranty\nUnder AMC\nOut of AMC",
- "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
- },
+ "fieldname": "warranty_amc_status",
+ "fieldtype": "Select",
+ "label": "Warranty / AMC Status",
+ "options": "\nUnder Warranty\nOut of Warranty\nUnder AMC\nOut of AMC"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "warranty_expiry_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": "Warranty Expiry Date",
- "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
- },
+ "fieldname": "warranty_expiry_date",
+ "fieldtype": "Date",
+ "label": "Warranty Expiry Date"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "amc_expiry_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": "AMC Expiry Date",
- "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
- },
+ "fieldname": "amc_expiry_date",
+ "fieldtype": "Date",
+ "label": "AMC Expiry Date"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "description": "",
- "fieldname": "resolution_section",
- "fieldtype": "Section 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,
- "label": "Resolution",
- "length": 0,
- "no_copy": 0,
- "oldfieldtype": "Section Break",
- "options": "fa fa-thumbs-up",
- "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
- },
+ "fieldname": "resolution_section",
+ "fieldtype": "Section Break",
+ "label": "Resolution",
+ "oldfieldtype": "Section Break",
+ "options": "fa fa-thumbs-up"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "resolution_date",
- "fieldtype": "Datetime",
- "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": "Resolution Date",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "resolution_date",
- "oldfieldtype": "Date",
- "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": 1,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "resolution_date",
+ "fieldtype": "Datetime",
+ "label": "Resolution Date",
+ "no_copy": 1,
+ "oldfieldname": "resolution_date",
+ "oldfieldtype": "Date",
+ "search_index": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "resolved_by",
- "fieldtype": "Link",
- "hidden": 0,
- "ignore_user_permissions": 1,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Resolved By",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "resolved_by",
- "oldfieldtype": "Link",
- "options": "User",
- "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": 1,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "resolved_by",
+ "fieldtype": "Link",
+ "ignore_user_permissions": 1,
+ "label": "Resolved By",
+ "no_copy": 1,
+ "oldfieldname": "resolved_by",
+ "oldfieldtype": "Link",
+ "options": "User",
+ "search_index": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "resolution_details",
- "fieldtype": "Text",
- "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": "Resolution Details",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "resolution_details",
- "oldfieldtype": "Text",
- "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
- },
+ "fieldname": "resolution_details",
+ "fieldtype": "Text",
+ "label": "Resolution Details",
+ "no_copy": 1,
+ "oldfieldname": "resolution_details",
+ "oldfieldtype": "Text"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
- "depends_on": "customer",
- "fieldname": "contact_info",
- "fieldtype": "Section 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,
- "label": "Customer Details",
- "length": 0,
- "no_copy": 0,
- "options": "fa fa-bullhorn",
- "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
- },
+ "collapsible": 1,
+ "depends_on": "customer",
+ "fieldname": "contact_info",
+ "fieldtype": "Section Break",
+ "label": "Customer Details",
+ "options": "fa fa-bullhorn"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 1,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "customer",
- "fieldname": "customer_name",
- "fieldtype": "Data",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 1,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Customer Name",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "bold": 1,
+ "depends_on": "customer",
+ "fieldname": "customer_name",
+ "fieldtype": "Data",
+ "in_global_search": 1,
+ "label": "Customer Name",
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "contact_person",
- "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": "Contact Person",
- "length": 0,
- "no_copy": 0,
- "options": "Contact",
- "permlevel": 0,
- "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
- },
+ "fieldname": "contact_person",
+ "fieldtype": "Link",
+ "label": "Contact Person",
+ "options": "Contact",
+ "print_hide": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "customer",
- "fieldname": "contact_display",
- "fieldtype": "Small Text",
- "hidden": 0,
- "ignore_user_permissions": 0,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 1,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Contact",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "depends_on": "customer",
+ "fieldname": "contact_display",
+ "fieldtype": "Small Text",
+ "in_global_search": 1,
+ "label": "Contact",
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "customer",
- "fieldname": "contact_mobile",
- "fieldtype": "Data",
- "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": "Mobile No",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "depends_on": "customer",
+ "fieldname": "contact_mobile",
+ "fieldtype": "Data",
+ "label": "Mobile No",
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "customer",
- "fieldname": "contact_email",
- "fieldtype": "Data",
- "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": "Contact Email",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "depends_on": "customer",
+ "fieldname": "contact_email",
+ "fieldtype": "Data",
+ "label": "Contact Email",
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "customer",
- "description": "",
- "fieldname": "territory",
- "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": "Territory",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "territory",
- "oldfieldtype": "Link",
- "options": "Territory",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 1,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "depends_on": "customer",
+ "fieldname": "territory",
+ "fieldtype": "Link",
+ "label": "Territory",
+ "oldfieldname": "territory",
+ "oldfieldtype": "Link",
+ "options": "Territory",
+ "print_hide": 1,
+ "read_only": 1,
+ "search_index": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "customer",
- "description": "",
- "fieldname": "customer_group",
- "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": "Customer Group",
- "length": 0,
- "no_copy": 0,
- "options": "Customer Group",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "depends_on": "customer",
+ "fieldname": "customer_group",
+ "fieldtype": "Link",
+ "label": "Customer Group",
+ "options": "Customer Group",
+ "print_hide": 1,
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "col_break4",
- "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,
+ "fieldname": "col_break4",
+ "fieldtype": "Column Break",
"width": "50%"
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "customer_address",
- "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": "Customer Address",
- "length": 0,
- "no_copy": 0,
- "options": "Address",
- "permlevel": 0,
- "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
- },
+ "fieldname": "customer_address",
+ "fieldtype": "Link",
+ "label": "Customer Address",
+ "options": "Address",
+ "print_hide": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "customer",
- "fieldname": "address_display",
- "fieldtype": "Small Text",
- "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": "Address",
- "length": 0,
- "no_copy": 0,
- "permlevel": 0,
- "print_hide": 0,
- "print_hide_if_no_value": 0,
- "read_only": 1,
- "remember_last_selected_value": 0,
- "report_hide": 0,
- "reqd": 0,
- "search_index": 0,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "depends_on": "customer",
+ "fieldname": "address_display",
+ "fieldtype": "Small Text",
+ "label": "Address",
+ "read_only": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "depends_on": "customer",
- "description": "If different than customer address",
- "fieldname": "service_address",
- "fieldtype": "Small Text",
- "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": "Service Address",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "service_address",
- "oldfieldtype": "Small Text",
- "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
- },
+ "depends_on": "customer",
+ "description": "If different than customer address",
+ "fieldname": "service_address",
+ "fieldtype": "Small Text",
+ "label": "Service Address",
+ "oldfieldname": "service_address",
+ "oldfieldtype": "Small Text"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 1,
- "columns": 0,
- "fieldname": "more_info",
- "fieldtype": "Section 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,
- "label": "More Information",
- "length": 0,
- "no_copy": 0,
- "options": "fa fa-file-text",
- "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
- },
+ "collapsible": 1,
+ "fieldname": "more_info",
+ "fieldtype": "Section Break",
+ "label": "More Information",
+ "options": "fa fa-file-text"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "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,
- "oldfieldname": "company",
- "oldfieldtype": "Link",
- "options": "Company",
- "permlevel": 0,
- "print_hide": 1,
- "print_hide_if_no_value": 0,
- "read_only": 0,
- "remember_last_selected_value": 1,
- "report_hide": 0,
- "reqd": 1,
- "search_index": 1,
- "set_only_once": 0,
- "translatable": 0,
- "unique": 0
- },
+ "fieldname": "company",
+ "fieldtype": "Link",
+ "label": "Company",
+ "oldfieldname": "company",
+ "oldfieldtype": "Link",
+ "options": "Company",
+ "print_hide": 1,
+ "remember_last_selected_value": 1,
+ "reqd": 1,
+ "search_index": 1
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "col_break6",
- "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,
+ "fieldname": "col_break6",
+ "fieldtype": "Column Break",
"width": "50%"
- },
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "complaint_raised_by",
- "fieldtype": "Data",
- "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": "Raised By",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "complaint_raised_by",
- "oldfieldtype": "Data",
- "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
- },
+ "fieldname": "complaint_raised_by",
+ "fieldtype": "Data",
+ "label": "Raised By",
+ "oldfieldname": "complaint_raised_by",
+ "oldfieldtype": "Data"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "from_company",
- "fieldtype": "Data",
- "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 Company",
- "length": 0,
- "no_copy": 0,
- "oldfieldname": "from_company",
- "oldfieldtype": "Data",
- "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
- },
+ "fieldname": "from_company",
+ "fieldtype": "Data",
+ "label": "From Company",
+ "oldfieldname": "from_company",
+ "oldfieldtype": "Data"
+ },
{
- "allow_bulk_edit": 0,
- "allow_in_quick_entry": 0,
- "allow_on_submit": 0,
- "bold": 0,
- "collapsible": 0,
- "columns": 0,
- "fieldname": "amended_from",
- "fieldtype": "Link",
- "hidden": 1,
- "ignore_user_permissions": 1,
- "ignore_xss_filter": 0,
- "in_filter": 0,
- "in_global_search": 0,
- "in_list_view": 0,
- "in_standard_filter": 0,
- "label": "Amended From",
- "length": 0,
- "no_copy": 1,
- "oldfieldname": "amended_from",
- "oldfieldtype": "Data",
- "options": "Warranty Claim",
- "permlevel": 0,
- "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,
+ "fieldname": "amended_from",
+ "fieldtype": "Link",
+ "hidden": 1,
+ "ignore_user_permissions": 1,
+ "label": "Amended From",
+ "no_copy": 1,
+ "oldfieldname": "amended_from",
+ "oldfieldtype": "Data",
+ "options": "Warranty Claim",
+ "print_hide": 1,
"width": "150px"
}
- ],
- "has_web_view": 0,
- "hide_heading": 0,
- "hide_toolbar": 0,
- "icon": "fa fa-bug",
- "idx": 1,
- "image_view": 0,
- "in_create": 0,
- "is_submittable": 0,
- "issingle": 0,
- "istable": 0,
- "max_attachments": 0,
- "modified": "2018-08-21 14:44:40.783226",
- "modified_by": "Administrator",
- "module": "Support",
- "name": "Warranty Claim",
- "owner": "harshada@webnotestech.com",
+ ],
+ "icon": "fa fa-bug",
+ "idx": 1,
+ "modified": "2019-05-24 10:56:30.626200",
+ "modified_by": "Administrator",
+ "module": "Support",
+ "name": "Warranty Claim",
+ "owner": "harshada@webnotestech.com",
"permissions": [
{
- "amend": 0,
- "cancel": 0,
- "create": 1,
- "delete": 1,
- "email": 1,
- "export": 0,
- "if_owner": 0,
- "import": 0,
- "permlevel": 0,
- "print": 1,
- "read": 1,
- "report": 1,
- "role": "Maintenance User",
- "set_user_permissions": 0,
- "share": 1,
- "submit": 0,
+ "create": 1,
+ "delete": 1,
+ "email": 1,
+ "print": 1,
+ "read": 1,
+ "report": 1,
+ "role": "Maintenance User",
+ "share": 1,
"write": 1
}
- ],
- "quick_entry": 0,
- "read_only": 0,
- "read_only_onload": 0,
- "search_fields": "status,customer,customer_name,territory",
- "show_name_in_global_search": 1,
- "sort_field": "modified",
- "sort_order": "DESC",
- "timeline_field": "customer",
- "title_field": "customer_name",
- "track_changes": 0,
- "track_seen": 0,
- "track_views": 0
+ ],
+ "search_fields": "status,customer,customer_name,territory",
+ "show_name_in_global_search": 1,
+ "sort_field": "modified",
+ "sort_order": "DESC",
+ "timeline_field": "customer",
+ "title_field": "customer_name"
}
\ No newline at end of file