customer issue cleanup
This commit is contained in:
parent
fec3f783af
commit
8b426a6142
@ -8,85 +8,85 @@
|
|||||||
//
|
//
|
||||||
// This program is distributed in the hope that it will be useful,
|
// This program is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
cur_frm.cscript.onload = function(doc,cdt,cdn){
|
cur_frm.cscript.onload = function(doc,cdt,cdn){
|
||||||
if(!doc.status) set_multiple(dt,dn,{status:'Open'});
|
if(!doc.status) set_multiple(dt,dn,{status:'Open'});
|
||||||
if(doc.__islocal){
|
if(doc.__islocal){
|
||||||
hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
hide_field(['customer_address','contact_person']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.refresh = function(doc,ct,cdn){
|
cur_frm.cscript.refresh = function(doc,ct,cdn){
|
||||||
if(!doc.docstatus) hide_field('make_maintenance_visit');
|
if(doc.docstatus == 1 && (doc.status == 'Open' || doc.status == 'Work In Progress'))
|
||||||
else if(doc.docstatus && (doc.status == 'Open' || doc.status == 'Work In Progress')) unhide_field('make_maintenance_visit');
|
cur_frm.add_custom_button('Make Maintenance Visit', cur_frm.cscript['Make Maintenance Visit']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//customer
|
//customer
|
||||||
cur_frm.cscript.customer = function(doc,dt,dn) {
|
cur_frm.cscript.customer = function(doc,dt,dn) {
|
||||||
var callback = function(r,rt) {
|
var callback = function(r,rt) {
|
||||||
var doc = locals[cur_frm.doctype][cur_frm.docname];
|
var doc = locals[cur_frm.doctype][cur_frm.docname];
|
||||||
cur_frm.refresh();
|
cur_frm.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
|
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
|
||||||
if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
|
if(doc.customer) unhide_field(['customer_address','contact_person']);
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
|
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
|
||||||
if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
|
if(doc.customer)
|
||||||
|
get_server_fields('get_customer_address',
|
||||||
|
JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict.customer_address.on_new = function(dn) {
|
cur_frm.fields_dict.customer_address.on_new = function(dn) {
|
||||||
locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
|
locals['Address'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
|
||||||
locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
|
locals['Address'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict.contact_person.on_new = function(dn) {
|
cur_frm.fields_dict.contact_person.on_new = function(dn) {
|
||||||
locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
|
locals['Contact'][dn].customer = locals[cur_frm.doctype][cur_frm.docname].customer;
|
||||||
locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
|
locals['Contact'][dn].customer_name = locals[cur_frm.doctype][cur_frm.docname].customer_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict['customer_address'].get_query = function(doc, cdt, cdn) {
|
||||||
return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
|
return 'SELECT name,address_line1,city FROM tabAddress WHERE customer = "'+ doc.customer +
|
||||||
|
'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
|
||||||
return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation FROM tabContact WHERE customer = "'+ doc.customer +'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
|
return 'SELECT name,CONCAT(first_name," ",ifnull(last_name,"")) As FullName,department,designation \
|
||||||
|
FROM tabContact WHERE customer = "' + doc.customer +
|
||||||
|
'" AND docstatus != 2 AND name LIKE "%s" ORDER BY name ASC LIMIT 50';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cur_frm.cscript['Make Maintenance Visit'] = function() {
|
||||||
|
var doc = cur_frm.doc;
|
||||||
|
if (doc.docstatus == 1) {
|
||||||
cur_frm.cscript.make_maintenance_visit = function(doc, cdt, cdn) {
|
$c_obj(make_doclist(doc.doctype, doc.name),'check_maintenance_visit','',
|
||||||
if (doc.docstatus == 1) {
|
function(r,rt){
|
||||||
$c_obj(make_doclist(doc.doctype, doc.name),'check_maintenance_visit','',
|
if(r.message == 'No'){
|
||||||
function(r,rt){
|
n = createLocal("Maintenance Visit");
|
||||||
if(r.message == 'No'){
|
$c('dt_map', args={
|
||||||
n = createLocal("Maintenance Visit");
|
'docs':compress_doclist([locals["Maintenance Visit"][n]]),
|
||||||
$c('dt_map', args={
|
'from_doctype':'Customer Issue',
|
||||||
'docs':compress_doclist([locals["Maintenance Visit"][n]]),
|
'to_doctype':'Maintenance Visit',
|
||||||
'from_doctype':'Customer Issue',
|
'from_docname':doc.name,
|
||||||
'to_doctype':'Maintenance Visit',
|
'from_to_list':"[['Customer Issue', 'Maintenance Visit'], ['Customer Issue', 'Maintenance Visit Purpose']]"
|
||||||
'from_docname':doc.name,
|
}, function(r,rt) {
|
||||||
'from_to_list':"[['Customer Issue', 'Maintenance Visit'], ['Customer Issue', 'Maintenance Visit Purpose']]"
|
loaddoc("Maintenance Visit", n);
|
||||||
}
|
});
|
||||||
, function(r,rt) {
|
} else{
|
||||||
loaddoc("Maintenance Visit", n);
|
msgprint("You have already completed maintenance against this Customer Issue");
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
}
|
);
|
||||||
else{
|
}
|
||||||
msgprint("You have already completed maintenance against this Customer Issue");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
@ -94,9 +94,13 @@ cur_frm.cscript.make_maintenance_visit = function(doc, cdt, cdn) {
|
|||||||
// ----------
|
// ----------
|
||||||
|
|
||||||
cur_frm.fields_dict['serial_no'].get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict['serial_no'].get_query = function(doc, cdt, cdn) {
|
||||||
var cond = '';
|
var cond = '';
|
||||||
if(doc.item_code) cond = ' AND `tabSerial No`.item_code = "'+ doc.item_code +'"';
|
if(doc.item_code) cond = ' AND `tabSerial No`.item_code = "'+ doc.item_code +'"';
|
||||||
return 'SELECT `tabSerial No`.name, `tabSerial No`.description FROM `tabSerial No` WHERE `tabSerial No`.docstatus != 2 AND `tabSerial No`.name LIKE "%s" '+cond+' ORDER BY `tabSerial No`.name ASC LIMIT 50';
|
if(doc.customer) cond += ' AND `tabSerial No`.customer = "' + doc.customer + '"';
|
||||||
|
return 'SELECT `tabSerial No`.name, `tabSerial No`.description \
|
||||||
|
FROM `tabSerial No` \
|
||||||
|
WHERE `tabSerial No`.docstatus != 2 AND `tabSerial No`.status = "Delivered" \
|
||||||
|
AND `tabSerial No`.name LIKE "%s" ' + cond + ' ORDER BY `tabSerial No`.name ASC LIMIT 50';
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.add_fetch('serial_no', 'item_code', 'item_code');
|
cur_frm.add_fetch('serial_no', 'item_code', 'item_code');
|
||||||
@ -105,20 +109,27 @@ 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', 'maintenance_status', 'warranty_amc_status');
|
||||||
cur_frm.add_fetch('serial_no', 'warranty_expiry_date', 'warranty_expiry_date');
|
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', 'amc_expiry_date', 'amc_expiry_date');
|
||||||
cur_frm.add_fetch('serial_no', 'customer', 'customer');
|
if (cstr(doc.customer) == '') {
|
||||||
cur_frm.add_fetch('serial_no', 'customer_name', 'customer_name');
|
cur_frm.add_fetch('serial_no', 'customer', 'customer');
|
||||||
cur_frm.add_fetch('serial_no', 'delivery_address', 'customer_address');
|
cur_frm.add_fetch('serial_no', 'customer_name', 'customer_name');
|
||||||
|
cur_frm.add_fetch('serial_no', 'delivery_address', 'customer_address');
|
||||||
|
}
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
// item code
|
// item code
|
||||||
// ----------
|
// ----------
|
||||||
cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
|
cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
|
||||||
if(doc.serial_no){
|
if(doc.serial_no) {
|
||||||
return 'SELECT `tabSerial No`.item_code, `tabSerial No`.description FROM `tabSerial No` WHERE `tabSerial No`.docstatus != 2 AND `tabSerial No`.name = "'+ doc.serial_no +'" AND `tabSerial No`.item_code LIKE "%s" ORDER BY `tabSerial No`.item_code ASC LIMIT 50';
|
return 'SELECT `tabSerial No`.item_code, `tabSerial No`.description \
|
||||||
}
|
FROM `tabSerial No` \
|
||||||
else{
|
WHERE `tabSerial No`.docstatus != 2 AND `tabSerial No`.name = "' + doc.serial_no +
|
||||||
return 'SELECT `tabItem`.name, `tabItem`.item_name, `tabItem`.description FROM `tabItem` WHERE `tabItem`.docstatus != 2 AND `tabItem`.name LIKE "%s" ORDER BY `tabItem`.name ASC LIMIT 50';
|
'" AND `tabSerial No`.item_code LIKE "%s" ORDER BY `tabSerial No`.item_code ASC LIMIT 50';
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
return 'SELECT `tabItem`.name, `tabItem`.item_name, `tabItem`.description \
|
||||||
|
FROM `tabItem` \
|
||||||
|
WHERE `tabItem`.docstatus != 2 AND `tabItem`.name LIKE "%s" ORDER BY `tabItem`.name ASC LIMIT 50';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.add_fetch('item_code', 'item_name', 'item_name');
|
cur_frm.add_fetch('item_code', 'item_name', 'item_name');
|
||||||
@ -128,5 +139,8 @@ cur_frm.add_fetch('item_code', 'description', 'description');
|
|||||||
//get query select Territory
|
//get query select Territory
|
||||||
//=======================================================================================================================
|
//=======================================================================================================================
|
||||||
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
|
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
|
||||||
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
|
return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` \
|
||||||
|
FROM `tabTerritory` \
|
||||||
|
WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 \
|
||||||
|
AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,11 +8,11 @@
|
|||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Please edit this list and import only required elements
|
# Please edit this list and import only required elements
|
||||||
|
|
||||||
@ -36,49 +36,42 @@ convert_to_lists = webnotes.conn.convert_to_lists
|
|||||||
from utilities.transaction_base import TransactionBase
|
from utilities.transaction_base import TransactionBase
|
||||||
|
|
||||||
class DocType(TransactionBase):
|
class DocType(TransactionBase):
|
||||||
def __init__(self, doc, doclist=[]):
|
def __init__(self, doc, doclist=[]):
|
||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.doclist = doclist
|
self.doclist = doclist
|
||||||
self.prefix = is_testing and 'test' or 'tab'
|
|
||||||
|
def autoname(self):
|
||||||
def autoname(self):
|
self.doc.name = make_autoname(self.doc.naming_series + '.######')
|
||||||
#self.doc.name = make_autoname('CI/' + self.doc.fiscal_year + '/.######')
|
|
||||||
self.doc.name = make_autoname(self.doc.naming_series + '.######')
|
|
||||||
|
|
||||||
#check if maintenance schedule already generated
|
#check if maintenance schedule already generated
|
||||||
#============================================
|
#============================================
|
||||||
def check_maintenance_visit(self):
|
def check_maintenance_visit(self):
|
||||||
nm = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1 and t1.completion_status='Fully Completed'", self.doc.name)
|
nm = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent=t1.name and t2.prevdoc_docname=%s and t1.docstatus=1 and t1.completion_status='Fully Completed'", self.doc.name)
|
||||||
nm = nm and nm[0][0] or ''
|
nm = nm and nm[0][0] or ''
|
||||||
|
|
||||||
if not nm:
|
if not nm:
|
||||||
return 'No'
|
return 'No'
|
||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
if session['user'] != 'Guest':
|
if session['user'] != 'Guest':
|
||||||
if not self.doc.allocated_to:
|
if not self.doc.allocated_to:
|
||||||
msgprint("Please select service person name whom you want to assign this issue")
|
msgprint("Please select service person name whom you want to assign this issue")
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
if session['user'] != 'Guest' and not self.doc.customer:
|
if session['user'] != 'Guest' and not self.doc.customer:
|
||||||
msgprint("Please select Customer from whom issue is raised")
|
msgprint("Please select Customer from whom issue is raised")
|
||||||
raise Exception
|
raise Exception
|
||||||
#if not self.doc.email_id and not self.doc.contact_no:
|
|
||||||
# msgprint("Please specify contact no. and/or email_id")
|
|
||||||
# raise Exception
|
|
||||||
#elif self.doc.email_id and not validate_email_add(self.doc.email_id.strip(' ')):
|
|
||||||
# msgprint('error:%s is not a valid email id' % self.doc.email_id)
|
|
||||||
# raise Exception
|
|
||||||
|
|
||||||
def on_cancel(self):
|
|
||||||
lst = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t2.prevdoc_docname = '%s' and t1.docstatus!=2"%(self.doc.name))
|
|
||||||
if lst:
|
|
||||||
lst1 = ','.join([x[0] for x in lst])
|
|
||||||
msgprint("Maintenance Visit No. "+lst1+" already created against this customer issue. So can not be Cancelled")
|
|
||||||
raise Exception
|
|
||||||
else:
|
|
||||||
set(self.doc, 'status', 'Cancelled')
|
|
||||||
|
|
||||||
def on_update(self):
|
|
||||||
pass
|
def on_cancel(self):
|
||||||
|
lst = sql("select t1.name from `tabMaintenance Visit` t1, `tabMaintenance Visit Purpose` t2 where t2.parent = t1.name and t2.prevdoc_docname = '%s' and t1.docstatus!=2"%(self.doc.name))
|
||||||
|
if lst:
|
||||||
|
lst1 = ','.join([x[0] for x in lst])
|
||||||
|
msgprint("Maintenance Visit No. "+lst1+" already created against this customer issue. So can not be Cancelled")
|
||||||
|
raise Exception
|
||||||
|
else:
|
||||||
|
set(self.doc, 'status', 'Cancelled')
|
||||||
|
|
||||||
|
def on_update(self):
|
||||||
|
pass
|
||||||
|
|||||||
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
# These values are common in all dictionaries
|
# These values are common in all dictionaries
|
||||||
{
|
{
|
||||||
'creation': '2012-03-27 14:36:40',
|
'creation': '2012-04-13 11:56:39',
|
||||||
'docstatus': 0,
|
'docstatus': 0,
|
||||||
'modified': '2012-03-27 14:45:47',
|
'modified': '2012-05-18 17:04:36',
|
||||||
'modified_by': u'Administrator',
|
'modified_by': u'Administrator',
|
||||||
'owner': u'harshada@webnotestech.com'
|
'owner': u'harshada@webnotestech.com'
|
||||||
},
|
},
|
||||||
@ -25,7 +25,7 @@
|
|||||||
'show_in_menu': 0,
|
'show_in_menu': 0,
|
||||||
'subject': u'%(complaint)s By %(complaint_raised_by)s on %(issue_date)s',
|
'subject': u'%(complaint)s By %(complaint_raised_by)s on %(issue_date)s',
|
||||||
'tag_fields': u'status',
|
'tag_fields': u'status',
|
||||||
'version': 97
|
'version': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# These values are common for all DocField
|
# These values are common for all DocField
|
||||||
@ -53,6 +53,15 @@
|
|||||||
'name': u'Customer Issue'
|
'name': u'Customer Issue'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocPerm
|
||||||
|
{
|
||||||
|
'create': 1,
|
||||||
|
'doctype': u'DocPerm',
|
||||||
|
'permlevel': 0,
|
||||||
|
'role': u'Guest',
|
||||||
|
'write': 1
|
||||||
|
},
|
||||||
|
|
||||||
# DocPerm
|
# DocPerm
|
||||||
{
|
{
|
||||||
'amend': 1,
|
'amend': 1,
|
||||||
@ -110,21 +119,12 @@
|
|||||||
'role': u'Maintenance User'
|
'role': u'Maintenance User'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocPerm
|
|
||||||
{
|
|
||||||
'create': 1,
|
|
||||||
'doctype': u'DocPerm',
|
|
||||||
'permlevel': 0,
|
|
||||||
'role': u'Guest',
|
|
||||||
'write': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'customer_issue',
|
'fieldname': u'basic_info',
|
||||||
'fieldtype': u'Section Break',
|
'fieldtype': u'Section Break',
|
||||||
'label': u'Customer Issue',
|
'label': u'Basic Info',
|
||||||
'oldfieldtype': u'Section Break',
|
'oldfieldtype': u'Section Break',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
@ -145,24 +145,6 @@
|
|||||||
'search_index': 0
|
'search_index': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'colour': u'White:FFF',
|
|
||||||
'default': u'Open',
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'status',
|
|
||||||
'fieldtype': u'Select',
|
|
||||||
'in_filter': 1,
|
|
||||||
'label': u'Status',
|
|
||||||
'no_copy': 1,
|
|
||||||
'oldfieldname': u'status',
|
|
||||||
'oldfieldtype': u'Select',
|
|
||||||
'options': u'\nOpen\nClosed\nWork In Progress\nCancelled',
|
|
||||||
'permlevel': 0,
|
|
||||||
'reqd': 1,
|
|
||||||
'search_index': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'default': u'Today',
|
'default': u'Today',
|
||||||
@ -178,39 +160,6 @@
|
|||||||
'search_index': 1
|
'search_index': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'complaint_raised_by',
|
|
||||||
'fieldtype': u'Data',
|
|
||||||
'label': u'Raised By',
|
|
||||||
'oldfieldname': u'complaint_raised_by',
|
|
||||||
'oldfieldtype': u'Data',
|
|
||||||
'permlevel': 0
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'from_company',
|
|
||||||
'fieldtype': u'Data',
|
|
||||||
'label': u'From Company',
|
|
||||||
'oldfieldname': u'from_company',
|
|
||||||
'oldfieldtype': u'Data',
|
|
||||||
'permlevel': 0
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'service_address',
|
|
||||||
'fieldtype': u'Small Text',
|
|
||||||
'label': u'Service Address',
|
|
||||||
'oldfieldname': u'service_address',
|
|
||||||
'oldfieldtype': u'Small Text',
|
|
||||||
'permlevel': 0
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
@ -261,144 +210,6 @@
|
|||||||
'print_hide': 1
|
'print_hide': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'customer_name',
|
|
||||||
'fieldtype': u'Data',
|
|
||||||
'label': u'Name',
|
|
||||||
'permlevel': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'address_display',
|
|
||||||
'fieldtype': u'Small Text',
|
|
||||||
'label': u'Address',
|
|
||||||
'permlevel': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'contact_display',
|
|
||||||
'fieldtype': u'Small Text',
|
|
||||||
'label': u'Contact',
|
|
||||||
'permlevel': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'contact_mobile',
|
|
||||||
'fieldtype': u'Data',
|
|
||||||
'label': u'Mobile No',
|
|
||||||
'permlevel': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'contact_email',
|
|
||||||
'fieldtype': u'Data',
|
|
||||||
'label': u'Contact Email',
|
|
||||||
'permlevel': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'colour': u'White:FFF',
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'territory',
|
|
||||||
'fieldtype': u'Link',
|
|
||||||
'in_filter': 1,
|
|
||||||
'label': u'Territory',
|
|
||||||
'oldfieldname': u'territory',
|
|
||||||
'oldfieldtype': u'Link',
|
|
||||||
'options': u'Territory',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'reqd': 0,
|
|
||||||
'search_index': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'customer_group',
|
|
||||||
'fieldtype': u'Link',
|
|
||||||
'label': u'Customer Group',
|
|
||||||
'options': u'Customer Group',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'reqd': 0
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'colour': u'White:FFF',
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'company',
|
|
||||||
'fieldtype': u'Link',
|
|
||||||
'in_filter': 1,
|
|
||||||
'label': u'Company',
|
|
||||||
'oldfieldname': u'company',
|
|
||||||
'oldfieldtype': u'Link',
|
|
||||||
'options': u'Company',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'reqd': 1,
|
|
||||||
'search_index': 1,
|
|
||||||
'trigger': u'Client'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'fiscal_year',
|
|
||||||
'fieldtype': u'Select',
|
|
||||||
'in_filter': 1,
|
|
||||||
'label': u'Fiscal Year',
|
|
||||||
'oldfieldname': u'fiscal_year',
|
|
||||||
'oldfieldtype': u'Select',
|
|
||||||
'options': u'link:Fiscal Year',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'reqd': 1,
|
|
||||||
'search_index': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'amended_from',
|
|
||||||
'fieldtype': u'Data',
|
|
||||||
'hidden': 1,
|
|
||||||
'label': u'Amended From',
|
|
||||||
'no_copy': 1,
|
|
||||||
'oldfieldname': u'amended_from',
|
|
||||||
'oldfieldtype': u'Data',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'width': u'150px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'amendment_date',
|
|
||||||
'fieldtype': u'Date',
|
|
||||||
'hidden': 1,
|
|
||||||
'label': u'Amendment Date',
|
|
||||||
'no_copy': 1,
|
|
||||||
'oldfieldname': u'amendment_date',
|
|
||||||
'oldfieldtype': u'Date',
|
|
||||||
'permlevel': 0,
|
|
||||||
'print_hide': 1,
|
|
||||||
'width': u'100px'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
@ -438,6 +249,29 @@
|
|||||||
'trigger': u'Client'
|
'trigger': u'Client'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'complaint',
|
||||||
|
'fieldtype': u'Small Text',
|
||||||
|
'label': u'Issue',
|
||||||
|
'no_copy': 1,
|
||||||
|
'oldfieldname': u'complaint',
|
||||||
|
'oldfieldtype': u'Small Text',
|
||||||
|
'permlevel': 0,
|
||||||
|
'reqd': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'column_break1',
|
||||||
|
'fieldtype': u'Column Break',
|
||||||
|
'oldfieldtype': u'Column Break',
|
||||||
|
'permlevel': 0,
|
||||||
|
'width': u'50%'
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
@ -465,29 +299,6 @@
|
|||||||
'width': u'300px'
|
'width': u'300px'
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'complaint',
|
|
||||||
'fieldtype': u'Small Text',
|
|
||||||
'label': u'Issue',
|
|
||||||
'no_copy': 1,
|
|
||||||
'oldfieldname': u'complaint',
|
|
||||||
'oldfieldtype': u'Small Text',
|
|
||||||
'permlevel': 0,
|
|
||||||
'reqd': 1
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'column_break1',
|
|
||||||
'fieldtype': u'Column Break',
|
|
||||||
'oldfieldtype': u'Column Break',
|
|
||||||
'permlevel': 0,
|
|
||||||
'width': u'50%'
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
@ -519,6 +330,17 @@
|
|||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'resolution_section',
|
||||||
|
'fieldtype': u'Section Break',
|
||||||
|
'label': u'Resolution',
|
||||||
|
'oldfieldtype': u'Section Break',
|
||||||
|
'options': u'Simple',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
@ -546,29 +368,6 @@
|
|||||||
'search_index': 1
|
'search_index': 1
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'resolution_detail',
|
|
||||||
'fieldtype': u'Section Break',
|
|
||||||
'label': u'Resolution Detail',
|
|
||||||
'oldfieldtype': u'Section Break',
|
|
||||||
'options': u'Simple',
|
|
||||||
'permlevel': 0
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
|
||||||
{
|
|
||||||
'doctype': u'DocField',
|
|
||||||
'fieldname': u'resolution_details',
|
|
||||||
'fieldtype': u'Text',
|
|
||||||
'label': u'Resolution Details',
|
|
||||||
'no_copy': 1,
|
|
||||||
'oldfieldname': u'resolution_details',
|
|
||||||
'oldfieldtype': u'Text',
|
|
||||||
'permlevel': 0
|
|
||||||
},
|
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
@ -610,27 +409,256 @@
|
|||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'allow_on_submit': 0,
|
|
||||||
'colour': u'White:FFF',
|
|
||||||
'depends_on': u'eval:!doc.__islocal',
|
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'next_steps',
|
'fieldname': u'resolution_details',
|
||||||
'fieldtype': u'Section Break',
|
'fieldtype': u'Text',
|
||||||
'label': u'Next Steps',
|
'label': u'Resolution Details',
|
||||||
'oldfieldtype': u'Section Break',
|
'no_copy': 1,
|
||||||
|
'oldfieldname': u'resolution_details',
|
||||||
|
'oldfieldtype': u'Text',
|
||||||
'permlevel': 0
|
'permlevel': 0
|
||||||
},
|
},
|
||||||
|
|
||||||
# DocField
|
# DocField
|
||||||
{
|
{
|
||||||
'allow_on_submit': 1,
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'contact_info',
|
||||||
|
'fieldtype': u'Section Break',
|
||||||
|
'label': u'Contact Info',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'col_break3',
|
||||||
|
'fieldtype': u'Column Break',
|
||||||
|
'permlevel': 0,
|
||||||
|
'width': u'50%'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'customer_name',
|
||||||
|
'fieldtype': u'Data',
|
||||||
|
'label': u'Customer Name',
|
||||||
|
'permlevel': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'customer_group',
|
||||||
|
'fieldtype': u'Link',
|
||||||
|
'label': u'Customer Group',
|
||||||
|
'options': u'Customer Group',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1,
|
||||||
|
'reqd': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
'colour': u'White:FFF',
|
'colour': u'White:FFF',
|
||||||
'doctype': u'DocField',
|
'doctype': u'DocField',
|
||||||
'fieldname': u'make_maintenance_visit',
|
'fieldname': u'territory',
|
||||||
'fieldtype': u'Button',
|
'fieldtype': u'Link',
|
||||||
'label': u'Make Maintenance Visit',
|
'in_filter': 1,
|
||||||
'oldfieldtype': u'Button',
|
'label': u'Territory',
|
||||||
|
'oldfieldname': u'territory',
|
||||||
|
'oldfieldtype': u'Link',
|
||||||
|
'options': u'Territory',
|
||||||
'permlevel': 0,
|
'permlevel': 0,
|
||||||
|
'print_hide': 1,
|
||||||
|
'reqd': 0,
|
||||||
|
'search_index': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'address_display',
|
||||||
|
'fieldtype': u'Small Text',
|
||||||
|
'label': u'Address',
|
||||||
|
'permlevel': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'col_break4',
|
||||||
|
'fieldtype': u'Column Break',
|
||||||
|
'permlevel': 0,
|
||||||
|
'width': u'50%'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'contact_display',
|
||||||
|
'fieldtype': u'Small Text',
|
||||||
|
'label': u'Contact',
|
||||||
|
'permlevel': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'contact_mobile',
|
||||||
|
'fieldtype': u'Data',
|
||||||
|
'label': u'Mobile No',
|
||||||
|
'permlevel': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'contact_email',
|
||||||
|
'fieldtype': u'Data',
|
||||||
|
'label': u'Contact Email',
|
||||||
|
'permlevel': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'service_address',
|
||||||
|
'fieldtype': u'Small Text',
|
||||||
|
'label': u'Service Address',
|
||||||
|
'oldfieldname': u'service_address',
|
||||||
|
'oldfieldtype': u'Small Text',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'more_info',
|
||||||
|
'fieldtype': u'Section Break',
|
||||||
|
'label': u'More Info',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'col_break5',
|
||||||
|
'fieldtype': u'Column Break',
|
||||||
|
'permlevel': 0,
|
||||||
|
'width': u'50%'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'colour': u'White:FFF',
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'company',
|
||||||
|
'fieldtype': u'Link',
|
||||||
|
'in_filter': 1,
|
||||||
|
'label': u'Company',
|
||||||
|
'oldfieldname': u'company',
|
||||||
|
'oldfieldtype': u'Link',
|
||||||
|
'options': u'Company',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1,
|
||||||
|
'reqd': 1,
|
||||||
|
'search_index': 1,
|
||||||
'trigger': u'Client'
|
'trigger': u'Client'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'fiscal_year',
|
||||||
|
'fieldtype': u'Select',
|
||||||
|
'in_filter': 1,
|
||||||
|
'label': u'Fiscal Year',
|
||||||
|
'oldfieldname': u'fiscal_year',
|
||||||
|
'oldfieldtype': u'Select',
|
||||||
|
'options': u'link:Fiscal Year',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1,
|
||||||
|
'reqd': 1,
|
||||||
|
'search_index': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'colour': u'White:FFF',
|
||||||
|
'default': u'Open',
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'status',
|
||||||
|
'fieldtype': u'Select',
|
||||||
|
'in_filter': 1,
|
||||||
|
'label': u'Status',
|
||||||
|
'no_copy': 1,
|
||||||
|
'oldfieldname': u'status',
|
||||||
|
'oldfieldtype': u'Select',
|
||||||
|
'options': u'\nOpen\nClosed\nWork In Progress\nCancelled',
|
||||||
|
'permlevel': 0,
|
||||||
|
'reqd': 1,
|
||||||
|
'search_index': 1
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'col_break6',
|
||||||
|
'fieldtype': u'Column Break',
|
||||||
|
'permlevel': 0,
|
||||||
|
'width': u'50%'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'complaint_raised_by',
|
||||||
|
'fieldtype': u'Data',
|
||||||
|
'label': u'Raised By',
|
||||||
|
'oldfieldname': u'complaint_raised_by',
|
||||||
|
'oldfieldtype': u'Data',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'from_company',
|
||||||
|
'fieldtype': u'Data',
|
||||||
|
'label': u'From Company',
|
||||||
|
'oldfieldname': u'from_company',
|
||||||
|
'oldfieldtype': u'Data',
|
||||||
|
'permlevel': 0
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'amended_from',
|
||||||
|
'fieldtype': u'Data',
|
||||||
|
'hidden': 1,
|
||||||
|
'label': u'Amended From',
|
||||||
|
'no_copy': 1,
|
||||||
|
'oldfieldname': u'amended_from',
|
||||||
|
'oldfieldtype': u'Data',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1,
|
||||||
|
'width': u'150px'
|
||||||
|
},
|
||||||
|
|
||||||
|
# DocField
|
||||||
|
{
|
||||||
|
'doctype': u'DocField',
|
||||||
|
'fieldname': u'amendment_date',
|
||||||
|
'fieldtype': u'Date',
|
||||||
|
'hidden': 1,
|
||||||
|
'label': u'Amendment Date',
|
||||||
|
'no_copy': 1,
|
||||||
|
'oldfieldname': u'amendment_date',
|
||||||
|
'oldfieldtype': u'Date',
|
||||||
|
'permlevel': 0,
|
||||||
|
'print_hide': 1,
|
||||||
|
'width': u'100px'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Loading…
x
Reference in New Issue
Block a user