maintenance visit cleanup and integrated with maintenance schedule

This commit is contained in:
Nabin Hait 2012-06-27 13:21:12 +05:30
parent b81aa88091
commit 490ae41cee
4 changed files with 415 additions and 290 deletions

View File

@ -0,0 +1,99 @@
# DocType Mapper, Maintenance Schedule-Maintenance Visit
[
# These values are common in all dictionaries
{
'creation': '2012-06-27 13:18:25',
'docstatus': 0,
'modified': '2012-06-27 13:18:25',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'name': '__common__',
'parent': u'Maintenance Schedule-Maintenance Visit',
'parentfield': u'table_mapper_details',
'parenttype': u'DocType Mapper',
'validation_logic': u'docstatus=1'
},
# These values are common for all Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'map': u'Yes',
'name': '__common__',
'parent': u'Maintenance Schedule-Maintenance Visit',
'parentfield': u'field_mapper_details',
'parenttype': u'DocType Mapper'
},
# These values are common for all DocType Mapper
{
'doctype': u'DocType Mapper',
'from_doctype': u'Maintenance Schedule',
'module': u'Support',
'name': '__common__',
'ref_doc_submitted': 1,
'to_doctype': u'Maintenance Visit'
},
# DocType Mapper, Maintenance Schedule-Maintenance Visit
{
'doctype': u'DocType Mapper',
'name': u'Maintenance Schedule-Maintenance Visit'
},
# Field Mapper Detail
{
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'customer',
'match_id': 0,
'to_field': u'customer'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'name',
'match_id': 0,
'to_field': u'maintenance_schedule'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'parent',
'match_id': 1,
'to_field': u'prevdoc_docname'
},
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
'from_field': u'parenttype',
'match_id': 1,
'to_field': u'prevdoc_doctype'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_field': u'item_maintenance_detail',
'from_table': u'Maintenance Schedule Item',
'match_id': 1,
'to_field': u'maintenance_visit_details',
'to_table': u'Maintenance Visit Purpose'
},
# Table Mapper Detail
{
'doctype': u'Table Mapper Detail',
'from_table': u'Maintenance Schedule',
'match_id': 0,
'to_table': u'Maintenance Visit'
}
]

View File

@ -16,16 +16,19 @@
cur_frm.cscript.onload = function(doc, dt, dn) { cur_frm.cscript.onload = function(doc, dt, dn) {
if(!doc.status) set_multiple(dt,dn,{status:'Draft'}); if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
if(doc.customer) cur_frm.cscript.customer(doc,cdt,cdn); if(doc.__islocal) set_multiple(dt,dn,{mntc_date:get_today()});
hide_contact_info(doc);
if(doc.__islocal){
set_multiple(dt,dn,{mntc_date:get_today()});
hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
}
//if(doc.maintenance_type) cur_frm.cscript.maintenance_type(doc,cdt,cdn);
} }
var hide_contact_info = function(doc) {
if(doc.customer) $(cur_frm.fields_dict.contact_info_section.row.wrapper).toggle(true);
else $(cur_frm.fields_dict.contact_info_section.row.wrapper).toggle(false);
}
cur_frm.cscript.refresh = function(doc) {
hide_contact_info(doc);
}
//customer //customer
cur_frm.cscript.customer = function(doc,dt,dn) { cur_frm.cscript.customer = function(doc,dt,dn) {
@ -35,7 +38,7 @@ cur_frm.cscript.customer = function(doc,dt,dn) {
} }
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']); hide_contact_info(doc);
} }
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) {
@ -62,36 +65,12 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
cur_frm.cscript.get_items = function(doc, dt, dn) { cur_frm.cscript.get_items = function(doc, dt, dn) {
var callback = function(r,rt) { var callback = function(r,rt) {
unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']); hide_contact_info(doc);
cur_frm.refresh(); cur_frm.refresh();
} }
get_server_fields('fetch_items','','',doc, dt, dn,1,callback); get_server_fields('fetch_items','','',doc, dt, dn,1,callback);
} }
/*
cur_frm.cscript.maintenance_type = function(doc,cdt,cdn){
if(doc.maintenance_type == 'Scheduled') {
hide_field('sales_order_no');
hide_field('customer_issue_no');
hide_field('Get Items');
doc.customer_issue_no = '';
doc.sales_order_no = '';
}
else if(doc.maintenance_type == 'Unscheduled') {
unhide_field('sales_order_no');
hide_field('customer_issue_no');
unhide_field('Get Items');
doc.customer_issue_no = '';
}
else if(doc.maintenance_type == 'Breakdown') {
hide_field('sales_order_no');
unhide_field('customer_issue_no');
unhide_field('Get Items');
doc.sales_order_no = '';
}
}*/
cur_frm.fields_dict['maintenance_visit_details'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) { cur_frm.fields_dict['maintenance_visit_details'].grid.get_field('item_code').get_query = function(doc, cdt, cdn) {
return 'SELECT tabItem.name,tabItem.item_name,tabItem.description FROM tabItem WHERE tabItem.is_service_item="Yes" AND tabItem.docstatus != 2 AND tabItem.%(key)s LIKE "%s" LIMIT 50'; return 'SELECT tabItem.name,tabItem.item_name,tabItem.description FROM tabItem WHERE tabItem.is_service_item="Yes" AND tabItem.docstatus != 2 AND tabItem.%(key)s LIKE "%s" LIMIT 50';
} }
@ -110,7 +89,6 @@ cur_frm.fields_dict['sales_order_no'].get_query = function(doc) {
if(doc.customer) { if(doc.customer) {
cond = '`tabSales Order`.customer = "'+doc.customer+'" AND'; cond = '`tabSales Order`.customer = "'+doc.customer+'" AND';
} }
//return repl('SELECT DISTINCT `tabSales Order`.name FROM `tabSales Order`, `tabSales Order Item` WHERE `tabSales Order`.company = "%(company)s" AND `tabSales Order`.docstatus = 1 AND %(cond)s `tabSales Order`.name LIKE "%s" ORDER BY `tabSales Order`.name DESC LIMIT 50', {company:doc.company, cond:cond});
return repl('SELECT DISTINCT `tabSales Order`.name FROM `tabSales Order`, `tabSales Order Item`, `tabItem` WHERE `tabSales Order`.company = "%(company)s" AND `tabSales Order`.docstatus = 1 AND `tabSales Order Item`.parent = `tabSales Order`.name AND `tabSales Order Item`.item_code = `tabItem`.name AND `tabItem`.is_service_item = "Yes" AND %(cond)s `tabSales Order`.name LIKE "%s" ORDER BY `tabSales Order`.name DESC LIMIT 50', {company:doc.company, cond:cond}); return repl('SELECT DISTINCT `tabSales Order`.name FROM `tabSales Order`, `tabSales Order Item`, `tabItem` WHERE `tabSales Order`.company = "%(company)s" AND `tabSales Order`.docstatus = 1 AND `tabSales Order Item`.parent = `tabSales Order`.name AND `tabSales Order Item`.item_code = `tabItem`.name AND `tabItem`.is_service_item = "Yes" AND %(cond)s `tabSales Order`.name LIKE "%s" ORDER BY `tabSales Order`.name DESC LIMIT 50', {company:doc.company, cond:cond});
} }
@ -123,8 +101,16 @@ cur_frm.fields_dict['customer_issue_no'].get_query = function(doc) {
return repl('SELECT `tabCustomer Issue`.name FROM `tabCustomer Issue` WHERE `tabCustomer Issue`.company = "%(company)s" AND %(cond)s `tabCustomer Issue`.docstatus = 1 AND (`tabCustomer Issue`.status = "Open" OR `tabCustomer Issue`.status = "Work In Progress") AND `tabCustomer Issue`.name LIKE "%s" ORDER BY `tabCustomer Issue`.name DESC LIMIT 50', {company:doc.company, cond:cond}); return repl('SELECT `tabCustomer Issue`.name FROM `tabCustomer Issue` WHERE `tabCustomer Issue`.company = "%(company)s" AND %(cond)s `tabCustomer Issue`.docstatus = 1 AND (`tabCustomer Issue`.status = "Open" OR `tabCustomer Issue`.status = "Work In Progress") AND `tabCustomer Issue`.name LIKE "%s" ORDER BY `tabCustomer Issue`.name DESC LIMIT 50', {company:doc.company, cond:cond});
} }
cur_frm.fields_dict['maintenance_schedule'].get_query = function(doc) {
doc = locals[this.doctype][this.docname];
var cond = '';
if(doc.customer) {
cond = '`tabMaintenance Schedule`.customer = "'+doc.customer+'" AND';
}
return repl('SELECT `tabMaintenance Schedule`.name FROM `tabMaintenance Schedule` WHERE `tabMaintenance Schedule`.company = "%(company)s" AND %(cond)s `tabMaintenance Schedule`.docstatus = 1 AND `tabMaintenance Schedule`.name LIKE "%s" ORDER BY `tabMaintenance Schedule`.name DESC LIMIT 50', {company:doc.company, cond:cond});
}
//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';
} }

View File

@ -52,17 +52,24 @@ class DocType(TransactionBase):
# fetch details of resp Sales order or customer issue # fetch details of resp Sales order or customer issue
#----------------------------------------------------------- #-----------------------------------------------------------
def fetch_items(self): def fetch_items(self):
if self.doc.sales_order_no and self.doc.customer_issue_no: if self.doc.sales_order_no and self.doc.customer_issue_no :
msgprint("You can not fetch details of both, Sales Order and Customer Issue, in same Maintenance Visit") msgprint("You can not fetch details of both, Sales Order and Customer Issue, in same Maintenance Visit")
raise Exception raise Exception
self.doc.clear_table(self.doclist, 'maintenance_visit_details') self.doc.clear_table(self.doclist, 'maintenance_visit_details')
if self.doc.sales_order_no: if self.doc.sales_order_no:
self.doclist = get_obj('DocType Mapper', 'Sales Order-Maintenance Visit').dt_map('Sales Order', 'Maintenance Visit', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Maintenance Visit'],['Sales Order Item', 'Maintenance Visit Purpose']]") self.doclist = get_obj('DocType Mapper', 'Sales Order-Maintenance Visit').dt_map('Sales Order', \
'Maintenance Visit', self.doc.sales_order_no, self.doc, self.doclist, "[['Sales Order', 'Maintenance Visit'],\
['Sales Order Item', 'Maintenance Visit Purpose']]")
elif self.doc.customer_issue_no: elif self.doc.customer_issue_no:
self.doclist = get_obj('DocType Mapper', 'Customer Issue-Maintenance Visit').dt_map('Customer Issue', 'Maintenance Visit', self.doc.customer_issue_no, self.doc, self.doclist, "[['Customer Issue', 'Maintenance Visit'],['Customer Issue', 'Maintenance Visit Purpose']]") self.doclist = get_obj('DocType Mapper', 'Customer Issue-Maintenance Visit').dt_map('Customer Issue', \
'Maintenance Visit', self.doc.customer_issue_no, self.doc, self.doclist, "[['Customer Issue', 'Maintenance Visit'],\
['Customer Issue', 'Maintenance Visit Purpose']]")
elif self.doc.maintenance_schedule:
self.doclist = get_obj('DocType Mapper', 'Maintenance Schedule-Maintenance Visit').dt_map('Maintenance Schedule',\
'Maintenance Visit', self.doc.maintenance_schedule, self.doc, self.doclist, "[['Maintenance Schedule', \
'Maintenance Visit'], ['Maintenance Schedule Item', 'Maintenance Visit Purpose']]")
#validate reference value using doctype mapper #validate reference value using doctype mapper
#----------------------------------------------------- #-----------------------------------------------------
@ -79,26 +86,19 @@ class DocType(TransactionBase):
if d.serial_no and not sql("select name from `tabSerial No` where name = '%s' and docstatus != 2" % d.serial_no): if d.serial_no and not sql("select name from `tabSerial No` where name = '%s' and docstatus != 2" % d.serial_no):
msgprint("Serial No: "+ d.serial_no + " not exists in the system") msgprint("Serial No: "+ d.serial_no + " not exists in the system")
raise Exception raise Exception
#elif not d.serial_no and d.item_code:
# ser = sql("select has_serial_no from tabItem where name = '%s'" % d.item_code)
# ser = ser and ser[0][0] or 'No'
# if ser == 'Yes':
# msgprint("Serial No is mandatory for item: " + d.item_code)
# raise Exception
def validate(self): def validate(self):
if not getlist(self.doclist, 'maintenance_visit_details'): if not getlist(self.doclist, 'maintenance_visit_details'):
msgprint("Please enter maintenance details") msgprint("Please enter maintenance details")
raise Exception raise Exception
check_for = ''
for d in getlist(self.doclist, 'maintenance_visit_details'): for d in getlist(self.doclist, 'maintenance_visit_details'):
if d.prevdoc_doctype == 'Sales Order': if d.prevdoc_doctype == 'Sales Order':
check_for = 'Sales Order' check_for = 'Sales Order'
elif d.prevdoc_doctype == 'Customer Issue': elif d.prevdoc_doctype == 'Customer Issue':
check_for = 'Customer Issue' check_for = 'Customer Issue'
else:
msgprint("Maintenance Visit must be created either against Sales Order or against Customer Issue")
raise Exception
if check_for: if check_for:
self.validate_reference_value(check_for) self.validate_reference_value(check_for)
@ -132,9 +132,9 @@ class DocType(TransactionBase):
sql("update `tabCustomer Issue` set resolution_date=%s, resolved_by=%s, resolution_details=%s, status=%s where name =%s",(mntc_date,service_person,work_done,status,d.prevdoc_docname)) sql("update `tabCustomer Issue` set resolution_date=%s, resolved_by=%s, resolution_details=%s, status=%s where name =%s",(mntc_date,service_person,work_done,status,d.prevdoc_docname))
# check if last maintenance visit against same sales order/ customer issue
#-----------------------------------------------------------------------------------
def check_if_last_visit(self): def check_if_last_visit(self):
"""check if last maintenance visit against same sales order/ customer issue"""
for d in getlist(self.doclist, 'maintenance_visit_details'): for d in getlist(self.doclist, 'maintenance_visit_details'):
if d.prevdoc_docname: if d.prevdoc_docname:
check_for_docname = d.prevdoc_docname check_for_docname = d.prevdoc_docname
@ -161,4 +161,3 @@ class DocType(TransactionBase):
def on_update(self): def on_update(self):
pass pass

View File

@ -3,9 +3,9 @@
# These values are common in all dictionaries # These values are common in all dictionaries
{ {
'creation': '2012-03-27 14:36:42', 'creation': '2012-06-11 12:10:15',
'docstatus': 0, 'docstatus': 0,
'modified': '2012-03-27 14:45:49', 'modified': '2012-06-27 12:50:00',
'modified_by': u'Administrator', 'modified_by': u'Administrator',
'owner': u'ashwini@webnotestech.com' 'owner': u'ashwini@webnotestech.com'
}, },
@ -26,7 +26,7 @@
'show_in_menu': 0, 'show_in_menu': 0,
'subject': u'To %(customer_name)s on %(mntc_date)s', 'subject': u'To %(customer_name)s on %(mntc_date)s',
'tag_fields': u'completion_status,maintenance_type', 'tag_fields': u'completion_status,maintenance_type',
'version': 95 'version': 1
}, },
# These values are common for all DocField # These values are common for all DocField
@ -144,38 +144,17 @@
'permlevel': 0, 'permlevel': 0,
'print_hide': 1, 'print_hide': 1,
'reqd': 1, 'reqd': 1,
'search_index': 1, 'search_index': 0,
'trigger': u'Client' 'trigger': u'Client'
}, },
# DocField
{
'doctype': u'DocField',
'fieldname': u'customer_address',
'fieldtype': u'Link',
'label': u'Customer Address',
'options': u'Address',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'contact_person',
'fieldtype': u'Link',
'label': u'Contact Person',
'options': u'Contact',
'permlevel': 0,
'print_hide': 1
},
# DocField # DocField
{ {
'doctype': u'DocField', 'doctype': u'DocField',
'fieldname': u'customer_name', 'fieldname': u'customer_name',
'fieldtype': u'Data', 'fieldtype': u'Data',
'label': u'Name', 'hidden': 1,
'label': u'Customer Name',
'permlevel': 1 'permlevel': 1
}, },
@ -184,6 +163,7 @@
'doctype': u'DocField', 'doctype': u'DocField',
'fieldname': u'address_display', 'fieldname': u'address_display',
'fieldtype': u'Small Text', 'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Address', 'label': u'Address',
'permlevel': 1 'permlevel': 1
}, },
@ -193,6 +173,7 @@
'doctype': u'DocField', 'doctype': u'DocField',
'fieldname': u'contact_display', 'fieldname': u'contact_display',
'fieldtype': u'Small Text', 'fieldtype': u'Small Text',
'hidden': 1,
'label': u'Contact', 'label': u'Contact',
'permlevel': 1 'permlevel': 1
}, },
@ -202,6 +183,7 @@
'doctype': u'DocField', 'doctype': u'DocField',
'fieldname': u'contact_mobile', 'fieldname': u'contact_mobile',
'fieldtype': u'Data', 'fieldtype': u'Data',
'hidden': 1,
'label': u'Mobile No', 'label': u'Mobile No',
'permlevel': 1 'permlevel': 1
}, },
@ -211,42 +193,11 @@
'doctype': u'DocField', 'doctype': u'DocField',
'fieldname': u'contact_email', 'fieldname': u'contact_email',
'fieldtype': u'Data', 'fieldtype': u'Data',
'hidden': 1,
'label': u'Contact Email', 'label': u'Contact Email',
'permlevel': 1 'permlevel': 1
}, },
# DocField
{
'doctype': u'DocField',
'fieldname': u'company',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Company',
'oldfieldname': u'company',
'oldfieldtype': u'Select',
'options': u'link:Company',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# 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': 0
},
# DocField # DocField
{ {
'doctype': u'DocField', 'doctype': u'DocField',
@ -283,72 +234,6 @@
'permlevel': 0 'permlevel': 0
}, },
# DocField
{
'colour': u'White:FFF',
'default': u'Draft',
'doctype': u'DocField',
'fieldname': u'status',
'fieldtype': u'Data',
'label': u'Status',
'no_copy': 1,
'oldfieldname': u'status',
'oldfieldtype': u'Data',
'options': u'\nDraft\nCancelled\nSubmitted',
'permlevel': 1,
'reqd': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amended_from',
'fieldtype': u'Data',
'label': u'Amended From',
'no_copy': 1,
'oldfieldname': u'amended_from',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amendment_date',
'fieldtype': u'Date',
'label': u'Amendment Date',
'no_copy': 1,
'oldfieldname': u'amendment_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'territory',
'fieldtype': u'Link',
'label': u'Territory',
'options': u'Territory',
'permlevel': 0,
'print_hide': 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
},
# DocField # DocField
{ {
'doctype': u'DocField', 'doctype': u'DocField',
@ -432,6 +317,17 @@
'trigger': u'Client' 'trigger': u'Client'
}, },
# DocField
{
'doctype': u'DocField',
'fieldname': u'maintenance_schedule',
'fieldtype': u'Link',
'in_filter': 1,
'label': u'Maintenance Schedule',
'options': u'Maintenance Schedule',
'permlevel': 0
},
# DocField # DocField
{ {
'doctype': u'DocField', 'doctype': u'DocField',
@ -470,9 +366,9 @@
# DocField # DocField
{ {
'doctype': u'DocField', 'doctype': u'DocField',
'fieldname': u'feedback', 'fieldname': u'more_info',
'fieldtype': u'Section Break', 'fieldtype': u'Section Break',
'label': u'Feedback', 'label': u'More Info',
'oldfieldtype': u'Section Break', 'oldfieldtype': u'Section Break',
'permlevel': 0 'permlevel': 0
}, },
@ -486,5 +382,150 @@
'oldfieldname': u'customer_feedback', 'oldfieldname': u'customer_feedback',
'oldfieldtype': u'Small Text', 'oldfieldtype': u'Small Text',
'permlevel': 0 'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break3',
'fieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'colour': u'White:FFF',
'default': u'Draft',
'doctype': u'DocField',
'fieldname': u'status',
'fieldtype': u'Data',
'label': u'Status',
'no_copy': 1,
'oldfieldname': u'status',
'oldfieldtype': u'Data',
'options': u'\nDraft\nCancelled\nSubmitted',
'permlevel': 1,
'reqd': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amended_from',
'fieldtype': u'Data',
'label': u'Amended From',
'no_copy': 1,
'oldfieldname': u'amended_from',
'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'width': u'150px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'amendment_date',
'fieldtype': u'Date',
'label': u'Amendment Date',
'no_copy': 1,
'oldfieldname': u'amendment_date',
'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'width': u'100px'
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'company',
'fieldtype': u'Select',
'in_filter': 1,
'label': u'Company',
'oldfieldname': u'company',
'oldfieldtype': u'Select',
'options': u'link:Company',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# 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': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'contact_info_section',
'fieldtype': u'Section Break',
'label': u'Contact Info',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'customer_address',
'fieldtype': u'Link',
'label': u'Customer Address',
'options': u'Address',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'contact_person',
'fieldtype': u'Link',
'label': u'Contact Person',
'options': u'Contact',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'col_break4',
'fieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
'doctype': u'DocField',
'fieldname': u'territory',
'fieldtype': u'Link',
'label': u'Territory',
'options': u'Territory',
'permlevel': 0,
'print_hide': 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
} }
] ]