fixed employee permissions, fixed bug in import_merge of timestamps
diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js
index aef944e..c47a6fd 100644
--- a/home/page/latest_updates/latest_updates.js
+++ b/home/page/latest_updates/latest_updates.js
@@ -1,4 +1,7 @@
 erpnext.updates = [
+	["30th November 2012", [
+		"Auto Notifications: System will prompt user with pre-set message for auto-notification.",
+	]],
 	["29th November 2012", [
 		"EMail: Form Emails are now via Communication (with Rich Text Etc.).",
 	]],
diff --git a/hr/doctype/employee/employee.py b/hr/doctype/employee/employee.py
index 0be6830..e65258f 100644
--- a/hr/doctype/employee/employee.py
+++ b/hr/doctype/employee/employee.py
@@ -37,6 +37,8 @@
 				self.doc.name = make_autoname(self.doc.naming_series + '.####')
 			elif ret[0][0]=='Employee Number':
 				self.doc.name = make_autoname(self.doc.employee_number)
+
+		self.doc.employee = self.doc.name
 				
 	def get_retirement_date(self):		
 		import datetime
@@ -51,6 +53,7 @@
 		return ret_sal_struct and ret_sal_struct[0][0] or ''
 
 	def validate(self):
+		self.doc.employee = self.doc.name
 		self.validate_date()
 		self.validate_email()
 		self.validate_name()
diff --git a/hr/doctype/employee/employee.txt b/hr/doctype/employee/employee.txt
index f780836..826df84 100644
--- a/hr/doctype/employee/employee.txt
+++ b/hr/doctype/employee/employee.txt
@@ -1,1069 +1,879 @@
-# DocType, Employee
 [
-
-	# These values are common in all dictionaries
-	{
-		u'creation': '2012-07-03 13:30:40',
-		u'docstatus': 0,
-		u'modified': '2012-11-14 16:54:18',
-		u'modified_by': u'Administrator',
-		u'owner': u'Administrator'
-	},
-
-	# These values are common for all DocType
-	{
-		'_last_update': u'1308918132',
-		'allow_attach': 1,
-		'allow_trash': 1,
-		'colour': u'White:FFF',
-		u'doctype': u'DocType',
-		'document_type': u'Master',
-		'module': u'HR',
-		u'name': u'__common__',
-		'search_fields': u'employee_name',
-		'section_style': u'Tabbed',
-		'server_code_error': u' ',
-		'show_in_menu': 0,
-		'subject': u'%(employee_name)s',
-		'tag_fields': u'status',
-		'version': 1
-	},
-
-	# These values are common for all DocField
-	{
-		u'doctype': u'DocField',
-		u'name': u'__common__',
-		'parent': u'Employee',
-		'parentfield': u'fields',
-		'parenttype': u'DocType'
-	},
-
-	# These values are common for all DocPerm
-	{
-		u'doctype': u'DocPerm',
-		u'name': u'__common__',
-		'parent': u'Employee',
-		'parentfield': u'permissions',
-		'parenttype': u'DocType',
-		'read': 1
-	},
-
-	# DocType, Employee
-	{
-		u'doctype': u'DocType',
-		u'name': u'Employee'
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'basic_information',
-		'fieldtype': u'Section Break',
-		'label': u'Basic Information',
-		'oldfieldtype': u'Section Break',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'column_break0',
-		'fieldtype': u'Column Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'description': u'<span class="sys_manager">To setup, please go to Setup > Naming Series</span>',
-		u'doctype': u'DocField',
-		'fieldname': u'naming_series',
-		'fieldtype': u'Select',
-		'label': u'Naming Series',
-		'no_copy': 1,
-		'oldfieldname': u'naming_series',
-		'oldfieldtype': u'Select',
-		'options': u'EMP/',
-		'permlevel': 0,
-		'reqd': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'salutation',
-		'fieldtype': u'Select',
-		'label': u'Salutation',
-		'oldfieldname': u'salutation',
-		'oldfieldtype': u'Select',
-		'options': u'\nMr\nMs',
-		'permlevel': 0,
-		'search_index': 0,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'employee_name',
-		'fieldtype': u'Data',
-		'label': u'Full Name',
-		'oldfieldname': u'employee_name',
-		'oldfieldtype': u'Data',
-		'permlevel': 0,
-		'reqd': 1
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'employee_number',
-		'fieldtype': u'Data',
-		'in_filter': 1,
-		'label': u'Employee Number',
-		'oldfieldname': u'employee_number',
-		'oldfieldtype': u'Data',
-		'permlevel': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'description': u'System User (login) ID. If set, it will become default for all HR forms.',
-		u'doctype': u'DocField',
-		'fieldname': u'user_id',
-		'fieldtype': u'Link',
-		'label': u'User ID',
-		'options': u'Profile',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'column_break1',
-		'fieldtype': u'Column Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'date_of_joining',
-		'fieldtype': u'Date',
-		'label': u'Date of Joining',
-		'oldfieldname': u'date_of_joining',
-		'oldfieldtype': u'Date',
-		'permlevel': 0,
-		'reqd': 1
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'date_of_birth',
-		'fieldtype': u'Date',
-		'in_filter': 1,
-		'label': u'Date of Birth',
-		'oldfieldname': u'date_of_birth',
-		'oldfieldtype': u'Date',
-		'permlevel': 0,
-		'reqd': 1,
-		'search_index': 0,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'gender',
-		'fieldtype': u'Select',
-		'in_filter': 1,
-		'label': u'Gender',
-		'oldfieldname': u'gender',
-		'oldfieldtype': u'Select',
-		'options': u'\nMale\nFemale',
-		'permlevel': 0,
-		'reqd': 1,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'company',
-		'fieldtype': u'Select',
-		'in_filter': 1,
-		'label': u'Company',
-		'options': u'link:Company',
-		'permlevel': 0,
-		'print_hide': 1,
-		'reqd': 1
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'employment_details',
-		'fieldtype': u'Section Break',
-		'label': u'Employment Details',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'col_break_21',
-		'fieldtype': u'Column Break',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'default': u'Active',
-		u'doctype': u'DocField',
-		'fieldname': u'status',
-		'fieldtype': u'Select',
-		'in_filter': 1,
-		'label': u'Status',
-		'oldfieldname': u'status',
-		'oldfieldtype': u'Select',
-		'options': u'\nActive\nLeft',
-		'permlevel': 0,
-		'reqd': 1,
-		'search_index': 1
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'employment_type',
-		'fieldtype': u'Link',
-		'in_filter': 1,
-		'label': u'Employment Type',
-		'oldfieldname': u'employment_type',
-		'oldfieldtype': u'Link',
-		'options': u'Employment Type',
-		'permlevel': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'description': u'Applicable Holiday List',
-		u'doctype': u'DocField',
-		'fieldname': u'holiday_list',
-		'fieldtype': u'Link',
-		'label': u'Holiday List',
-		'oldfieldname': u'holiday_list',
-		'oldfieldtype': u'Link',
-		'options': u'Holiday List',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'col_break_22',
-		'fieldtype': u'Column Break',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'scheduled_confirmation_date',
-		'fieldtype': u'Date',
-		'in_filter': 1,
-		'label': u'Scheduled Confirmation Date',
-		'oldfieldname': u'scheduled_confirmation_date',
-		'oldfieldtype': u'Date',
-		'permlevel': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'final_confirmation_date',
-		'fieldtype': u'Date',
-		'label': u'Final Confirmation Date',
-		'oldfieldname': u'final_confirmation_date',
-		'oldfieldtype': u'Date',
-		'permlevel': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'contract_end_date',
-		'fieldtype': u'Date',
-		'in_filter': 1,
-		'label': u'Contract End Date',
-		'oldfieldname': u'contract_end_date',
-		'oldfieldtype': u'Date',
-		'permlevel': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'date_of_retirement',
-		'fieldtype': u'Date',
-		'label': u'Date Of Retirement',
-		'oldfieldname': u'date_of_retirement',
-		'oldfieldtype': u'Date',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'job_profile',
-		'fieldtype': u'Section Break',
-		'label': u'Job Profile',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'column_break2',
-		'fieldtype': u'Column Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'branch',
-		'fieldtype': u'Link',
-		'in_filter': 1,
-		'label': u'Branch',
-		'oldfieldname': u'branch',
-		'oldfieldtype': u'Link',
-		'options': u'Branch',
-		'permlevel': 0,
-		'reqd': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'department',
-		'fieldtype': u'Link',
-		'in_filter': 1,
-		'label': u'Department',
-		'oldfieldname': u'department',
-		'oldfieldtype': u'Link',
-		'options': u'Department',
-		'permlevel': 0,
-		'reqd': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'designation',
-		'fieldtype': u'Link',
-		'in_filter': 1,
-		'label': u'Designation',
-		'oldfieldname': u'designation',
-		'oldfieldtype': u'Link',
-		'options': u'Designation',
-		'permlevel': 0,
-		'reqd': 0,
-		'search_index': 1
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'grade',
-		'fieldtype': u'Link',
-		'in_filter': 1,
-		'label': u'Grade',
-		'oldfieldname': u'grade',
-		'oldfieldtype': u'Link',
-		'options': u'Grade',
-		'permlevel': 0,
-		'reqd': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'reports_to',
-		'fieldtype': u'Link',
-		'label': u'Reports to',
-		'oldfieldname': u'reports_to',
-		'oldfieldtype': u'Link',
-		'options': u'Employee',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		'description': u'Provide email id registered in company',
-		u'doctype': u'DocField',
-		'fieldname': u'company_email',
-		'fieldtype': u'Data',
-		'in_filter': 1,
-		'label': u'Email (By company)',
-		'oldfieldname': u'company_email',
-		'oldfieldtype': u'Data',
-		'permlevel': 0,
-		'reqd': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'salary_information',
-		'fieldtype': u'Column Break',
-		'label': u'Salary Information',
-		'oldfieldtype': u'Section Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'salary_mode',
-		'fieldtype': u'Select',
-		'label': u'Salary Mode',
-		'oldfieldname': u'salary_mode',
-		'oldfieldtype': u'Select',
-		'options': u'\nBank\nCash\nCheque',
-		'permlevel': 0,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'depends_on': u"eval:doc.salary_mode == 'Bank'",
-		u'doctype': u'DocField',
-		'fieldname': u'bank_name',
-		'fieldtype': u'Data',
-		'hidden': 0,
-		'in_filter': 1,
-		'label': u'Bank Name',
-		'oldfieldname': u'bank_name',
-		'oldfieldtype': u'Link',
-		'options': u'Suggest',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'depends_on': u"eval:doc.salary_mode == 'Bank'",
-		u'doctype': u'DocField',
-		'fieldname': u'bank_ac_no',
-		'fieldtype': u'Data',
-		'hidden': 0,
-		'label': u'Bank A/C No.',
-		'oldfieldname': u'bank_ac_no',
-		'oldfieldtype': u'Data',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'esic_card_no',
-		'fieldtype': u'Data',
-		'label': u'ESIC CARD No',
-		'oldfieldname': u'esic_card_no',
-		'oldfieldtype': u'Data',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'pf_number',
-		'fieldtype': u'Data',
-		'label': u'PF Number',
-		'oldfieldname': u'pf_number',
-		'oldfieldtype': u'Data',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'gratuity_lic_id',
-		'fieldtype': u'Data',
-		'label': u'Gratuity LIC ID',
-		'oldfieldname': u'gratuity_lic_id',
-		'oldfieldtype': u'Data',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'contact_details',
-		'fieldtype': u'Section Break',
-		'label': u'Contact Details',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'column_break3',
-		'fieldtype': u'Column Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'cell_number',
-		'fieldtype': u'Data',
-		'label': u'Cell Number',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'personal_email',
-		'fieldtype': u'Data',
-		'label': u'Personal Email',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'notice_number_of_days',
-		'fieldtype': u'Int',
-		'label': u'Notice - Number of Days',
-		'oldfieldname': u'notice_number_of_days',
-		'oldfieldtype': u'Int',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'emergency_contact_details',
-		'fieldtype': u'HTML',
-		'label': u'Emergency Contact Details',
-		'options': u'<b>Emergency Contact Details</b>',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'person_to_be_contacted',
-		'fieldtype': u'Data',
-		'label': u'Person To Be Contacted',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'relation',
-		'fieldtype': u'Data',
-		'label': u'Relation',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'emergency_phone_number',
-		'fieldtype': u'Data',
-		'label': u'Emergency Phone Number',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'column_break4',
-		'fieldtype': u'Column Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'permanent_accommodation_type',
-		'fieldtype': u'Select',
-		'label': u'Permanent Accommodation Type',
-		'options': u'\nRented\nOwned',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'permanent_address',
-		'fieldtype': u'Small Text',
-		'label': u'Permanent Address',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'current_accommodation_type',
-		'fieldtype': u'Select',
-		'label': u'Current Accommodation Type',
-		'options': u'\nRented\nOwned',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'current_address',
-		'fieldtype': u'Small Text',
-		'label': u'Current Address',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'personal_details',
-		'fieldtype': u'Section Break',
-		'label': u'Personal Details',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'column_break5',
-		'fieldtype': u'Column Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'pan_number',
-		'fieldtype': u'Data',
-		'label': u'PAN Number',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'passport_number',
-		'fieldtype': u'Data',
-		'label': u'Passport Number',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'date_of_issue',
-		'fieldtype': u'Date',
-		'label': u'Date of Issue',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'valid_upto',
-		'fieldtype': u'Date',
-		'label': u'Valid Upto',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		u'doctype': u'DocField',
-		'fieldname': u'salary_structure',
-		'fieldtype': u'Button',
-		'hidden': 1,
-		'label': u'Salary Structure',
-		'oldfieldtype': u'Button',
-		'permlevel': 0,
-		'trigger': u'Client'
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'place_of_issue',
-		'fieldtype': u'Data',
-		'label': u'Place of Issue',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'marital_status',
-		'fieldtype': u'Select',
-		'label': u'Marital Status',
-		'options': u'\nSingle\nMarried\nDivorced\nWidowed',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'blood_group',
-		'fieldtype': u'Select',
-		'label': u'Blood Group',
-		'options': u'\nA+\nA-\nB+\nB-\nAB+\nAB-\nO+\nO-',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'column_break6',
-		'fieldtype': u'Column Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'description': u'Here you can maintain family details like name and occupation of parent, spouse and children',
-		u'doctype': u'DocField',
-		'fieldname': u'family_background',
-		'fieldtype': u'Small Text',
-		'label': u'Family Background',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		'colour': u'White:FFF',
-		'description': u'Here you can maintain height, weight, allergies, medical concerns etc',
-		u'doctype': u'DocField',
-		'fieldname': u'health_details',
-		'fieldtype': u'Small Text',
-		'label': u'Health Details',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'educational_qualification',
-		'fieldtype': u'Section Break',
-		'label': u'Educational Qualification',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'educational_qualification_details',
-		'fieldtype': u'Table',
-		'label': u'Educational Qualification Details',
-		'options': u'Employee Education',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'career_history',
-		'fieldtype': u'Section Break',
-		'label': u'Career History',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'previous_work_experience',
-		'fieldtype': u'Section Break',
-		'label': u'Previous Work Experience',
-		'options': u'Simple',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'previous_experience_details',
-		'fieldtype': u'Table',
-		'label': u'Employee External Work History',
-		'options': u'Employee External Work History',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'history_in_company',
-		'fieldtype': u'Section Break',
-		'label': u'History In Company',
-		'options': u'Simple',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'experience_in_company_details',
-		'fieldtype': u'Table',
-		'label': u'Employee Internal Work Historys',
-		'options': u'Employee Internal Work History',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'exit',
-		'fieldtype': u'Section Break',
-		'label': u'Exit',
-		'oldfieldtype': u'Section Break',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'column_break7',
-		'fieldtype': u'Column Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'resignation_letter_date',
-		'fieldtype': u'Date',
-		'label': u'Resignation Letter Date',
-		'oldfieldname': u'resignation_letter_date',
-		'oldfieldtype': u'Date',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'relieving_date',
-		'fieldtype': u'Date',
-		'in_filter': 1,
-		'label': u'Relieving Date',
-		'oldfieldname': u'relieving_date',
-		'oldfieldtype': u'Date',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'reason_for_leaving',
-		'fieldtype': u'Data',
-		'label': u'Reason for Leaving',
-		'oldfieldname': u'reason_for_leaving',
-		'oldfieldtype': u'Data',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'leave_encashed',
-		'fieldtype': u'Select',
-		'label': u'Leave Encashed?',
-		'oldfieldname': u'leave_encashed',
-		'oldfieldtype': u'Select',
-		'options': u'\nYes\nNo',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'encashment_date',
-		'fieldtype': u'Date',
-		'label': u'Encashment Date',
-		'oldfieldname': u'encashment_date',
-		'oldfieldtype': u'Date',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'exit_interview_details',
-		'fieldtype': u'Column Break',
-		'label': u'Exit Interview Details',
-		'oldfieldname': u'col_brk6',
-		'oldfieldtype': u'Column Break',
-		'permlevel': 0,
-		'width': u'50%'
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'held_on',
-		'fieldtype': u'Date',
-		'label': u'Held On',
-		'oldfieldname': u'held_on',
-		'oldfieldtype': u'Date',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'reason_for_resignation',
-		'fieldtype': u'Select',
-		'label': u'Reason for Resignation',
-		'oldfieldname': u'reason_for_resignation',
-		'oldfieldtype': u'Select',
-		'options': u'\nBetter Prospects\nHealth Concerns',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'new_workplace',
-		'fieldtype': u'Data',
-		'label': u'New Workplace',
-		'oldfieldname': u'new_workplace',
-		'oldfieldtype': u'Data',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'feedback',
-		'fieldtype': u'Small Text',
-		'label': u'Feedback',
-		'oldfieldname': u'feedback',
-		'oldfieldtype': u'Text',
-		'permlevel': 0
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'file_list',
-		'fieldtype': u'Text',
-		'hidden': 1,
-		'label': u'File List',
-		'permlevel': 0,
-		'print_hide': 1
-	},
-
-	# DocField
-	{
-		u'doctype': u'DocField',
-		'fieldname': u'trash_reason',
-		'fieldtype': u'Small Text',
-		'label': u'Trash Reason',
-		'oldfieldname': u'trash_reason',
-		'oldfieldtype': u'Small Text',
-		'permlevel': 1
-	},
-
-	# DocPerm
-	{
-		'amend': 0,
-		'cancel': 0,
-		'create': 0,
-		u'doctype': u'DocPerm',
-		'permlevel': 0,
-		'role': u'Employee',
-		'submit': 0,
-		'write': 0
-	},
-
-	# DocPerm
-	{
-		'amend': 0,
-		'cancel': 0,
-		'create': 0,
-		u'doctype': u'DocPerm',
-		'permlevel': 0,
-		'role': u'Employee',
-		'submit': 0,
-		'write': 0
-	},
-
-	# DocPerm
-	{
-		u'doctype': u'DocPerm',
-		'permlevel': 1,
-		'role': u'All'
-	},
-
-	# DocPerm
-	{
-		'cancel': 1,
-		'create': 1,
-		u'doctype': u'DocPerm',
-		'permlevel': 0,
-		'role': u'HR User',
-		'write': 1
-	},
-
-	# DocPerm
-	{
-		'cancel': 1,
-		'create': 1,
-		u'doctype': u'DocPerm',
-		'permlevel': 0,
-		'role': u'HR Manager',
-		'write': 1
-	},
-
-	# DocPerm
-	{
-		u'doctype': u'DocPerm',
-		'permlevel': 1,
-		'role': u'HR User'
-	},
-
-	# DocPerm
-	{
-		u'doctype': u'DocPerm',
-		'permlevel': 1,
-		'role': u'HR Manager'
-	}
+ {
+  "owner": "Administrator", 
+  "docstatus": 0, 
+  "creation": "2012-11-30 11:49:12", 
+  "modified_by": "Administrator", 
+  "modified": "2012-11-30 11:54:31"
+ }, 
+ {
+  "autoname": "naming_series:", 
+  "allow_attach": 1, 
+  "search_fields": "employee_name", 
+  "module": "HR", 
+  "doctype": "DocType", 
+  "document_type": "Master", 
+  "name": "__common__"
+ }, 
+ {
+  "name": "__common__", 
+  "parent": "Employee", 
+  "doctype": "DocField", 
+  "parenttype": "DocType", 
+  "parentfield": "fields"
+ }, 
+ {
+  "name": "__common__", 
+  "parent": "Employee", 
+  "amend": 0, 
+  "submit": 0, 
+  "doctype": "DocPerm", 
+  "read": 1, 
+  "parenttype": "DocType", 
+  "parentfield": "permissions"
+ }, 
+ {
+  "name": "Employee", 
+  "doctype": "DocType"
+ }, 
+ {
+  "oldfieldtype": "Section Break", 
+  "doctype": "DocField", 
+  "label": "Basic Information", 
+  "fieldname": "basic_information", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "width": "50%", 
+  "fieldname": "column_break0", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "print_hide": 1, 
+  "no_copy": 1, 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Employee", 
+  "fieldname": "employee", 
+  "fieldtype": "Data", 
+  "hidden": 1, 
+  "permlevel": 0, 
+  "report_hide": 1
+ }, 
+ {
+  "description": "<span class=\"sys_manager\">To setup, please go to Setup > Naming Series</span>", 
+  "no_copy": 1, 
+  "oldfieldtype": "Select", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Naming Series", 
+  "oldfieldname": "naming_series", 
+  "permlevel": 0, 
+  "fieldname": "naming_series", 
+  "fieldtype": "Select", 
+  "reqd": 0, 
+  "options": "EMP/"
+ }, 
+ {
+  "oldfieldtype": "Select", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Salutation", 
+  "oldfieldname": "salutation", 
+  "trigger": "Client", 
+  "fieldname": "salutation", 
+  "fieldtype": "Select", 
+  "search_index": 0, 
+  "options": "\nMr\nMs", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Full Name", 
+  "oldfieldname": "employee_name", 
+  "fieldname": "employee_name", 
+  "fieldtype": "Data", 
+  "reqd": 1, 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "Employee Number", 
+  "oldfieldname": "employee_number", 
+  "fieldname": "employee_number", 
+  "fieldtype": "Data", 
+  "search_index": 0, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "description": "System User (login) ID. If set, it will become default for all HR forms.", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "User ID", 
+  "options": "Profile", 
+  "fieldname": "user_id", 
+  "fieldtype": "Link", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "width": "50%", 
+  "fieldname": "column_break1", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Date of Joining", 
+  "oldfieldname": "date_of_joining", 
+  "fieldname": "date_of_joining", 
+  "fieldtype": "Date", 
+  "reqd": 1, 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Date of Birth", 
+  "oldfieldname": "date_of_birth", 
+  "trigger": "Client", 
+  "fieldname": "date_of_birth", 
+  "fieldtype": "Date", 
+  "search_index": 0, 
+  "reqd": 1, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Select", 
+  "doctype": "DocField", 
+  "label": "Gender", 
+  "oldfieldname": "gender", 
+  "options": "\nMale\nFemale", 
+  "fieldname": "gender", 
+  "fieldtype": "Select", 
+  "search_index": 0, 
+  "reqd": 1, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "print_hide": 1, 
+  "doctype": "DocField", 
+  "label": "Company", 
+  "options": "link:Company", 
+  "fieldname": "company", 
+  "fieldtype": "Select", 
+  "reqd": 1, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Employment Details", 
+  "fieldname": "employment_details", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "col_break_21", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "default": "Active", 
+  "oldfieldtype": "Select", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Status", 
+  "oldfieldname": "status", 
+  "permlevel": 0, 
+  "fieldname": "status", 
+  "fieldtype": "Select", 
+  "search_index": 1, 
+  "reqd": 1, 
+  "options": "\nActive\nLeft", 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Link", 
+  "doctype": "DocField", 
+  "label": "Employment Type", 
+  "oldfieldname": "employment_type", 
+  "options": "Employment Type", 
+  "fieldname": "employment_type", 
+  "fieldtype": "Link", 
+  "search_index": 0, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "description": "Applicable Holiday List", 
+  "oldfieldtype": "Link", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Holiday List", 
+  "oldfieldname": "holiday_list", 
+  "options": "Holiday List", 
+  "fieldname": "holiday_list", 
+  "fieldtype": "Link", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "fieldname": "col_break_22", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "doctype": "DocField", 
+  "label": "Scheduled Confirmation Date", 
+  "oldfieldname": "scheduled_confirmation_date", 
+  "fieldname": "scheduled_confirmation_date", 
+  "fieldtype": "Date", 
+  "search_index": 0, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Final Confirmation Date", 
+  "oldfieldname": "final_confirmation_date", 
+  "fieldname": "final_confirmation_date", 
+  "fieldtype": "Date", 
+  "search_index": 0, 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "doctype": "DocField", 
+  "label": "Contract End Date", 
+  "oldfieldname": "contract_end_date", 
+  "fieldname": "contract_end_date", 
+  "fieldtype": "Date", 
+  "search_index": 0, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "doctype": "DocField", 
+  "label": "Date Of Retirement", 
+  "oldfieldname": "date_of_retirement", 
+  "fieldname": "date_of_retirement", 
+  "fieldtype": "Date", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Job Profile", 
+  "fieldname": "job_profile", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "width": "50%", 
+  "fieldname": "column_break2", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Link", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Branch", 
+  "oldfieldname": "branch", 
+  "options": "Branch", 
+  "fieldname": "branch", 
+  "fieldtype": "Link", 
+  "reqd": 0, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Link", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Department", 
+  "oldfieldname": "department", 
+  "options": "Department", 
+  "fieldname": "department", 
+  "fieldtype": "Link", 
+  "reqd": 0, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Link", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Designation", 
+  "oldfieldname": "designation", 
+  "permlevel": 0, 
+  "fieldname": "designation", 
+  "fieldtype": "Link", 
+  "search_index": 1, 
+  "reqd": 0, 
+  "options": "Designation", 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Link", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Grade", 
+  "oldfieldname": "grade", 
+  "options": "Grade", 
+  "fieldname": "grade", 
+  "fieldtype": "Link", 
+  "reqd": 0, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Link", 
+  "doctype": "DocField", 
+  "label": "Reports to", 
+  "oldfieldname": "reports_to", 
+  "options": "Employee", 
+  "fieldname": "reports_to", 
+  "fieldtype": "Link", 
+  "permlevel": 0
+ }, 
+ {
+  "description": "Provide email id registered in company", 
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "Email (By company)", 
+  "oldfieldname": "company_email", 
+  "fieldname": "company_email", 
+  "fieldtype": "Data", 
+  "reqd": 0, 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Section Break", 
+  "doctype": "DocField", 
+  "label": "Salary Information", 
+  "width": "50%", 
+  "fieldname": "salary_information", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Select", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Salary Mode", 
+  "oldfieldname": "salary_mode", 
+  "trigger": "Client", 
+  "fieldname": "salary_mode", 
+  "fieldtype": "Select", 
+  "options": "\nBank\nCash\nCheque", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Link", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Bank Name", 
+  "oldfieldname": "bank_name", 
+  "permlevel": 0, 
+  "fieldname": "bank_name", 
+  "fieldtype": "Data", 
+  "depends_on": "eval:doc.salary_mode == 'Bank'", 
+  "hidden": 0, 
+  "options": "Suggest", 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Bank A/C No.", 
+  "oldfieldname": "bank_ac_no", 
+  "fieldname": "bank_ac_no", 
+  "fieldtype": "Data", 
+  "depends_on": "eval:doc.salary_mode == 'Bank'", 
+  "hidden": 0, 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "ESIC CARD No", 
+  "oldfieldname": "esic_card_no", 
+  "fieldname": "esic_card_no", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "PF Number", 
+  "oldfieldname": "pf_number", 
+  "fieldname": "pf_number", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "Gratuity LIC ID", 
+  "oldfieldname": "gratuity_lic_id", 
+  "fieldname": "gratuity_lic_id", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Contact Details", 
+  "fieldname": "contact_details", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "width": "50%", 
+  "fieldname": "column_break3", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Cell Number", 
+  "fieldname": "cell_number", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Personal Email", 
+  "fieldname": "personal_email", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Int", 
+  "doctype": "DocField", 
+  "label": "Notice - Number of Days", 
+  "oldfieldname": "notice_number_of_days", 
+  "fieldname": "notice_number_of_days", 
+  "fieldtype": "Int", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Emergency Contact Details", 
+  "options": "<b>Emergency Contact Details</b>", 
+  "fieldname": "emergency_contact_details", 
+  "fieldtype": "HTML", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Person To Be Contacted", 
+  "fieldname": "person_to_be_contacted", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Relation", 
+  "fieldname": "relation", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Emergency Phone Number", 
+  "fieldname": "emergency_phone_number", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "width": "50%", 
+  "fieldname": "column_break4", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Permanent Accommodation Type", 
+  "options": "\nRented\nOwned", 
+  "fieldname": "permanent_accommodation_type", 
+  "fieldtype": "Select", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Permanent Address", 
+  "fieldname": "permanent_address", 
+  "fieldtype": "Small Text", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Current Accommodation Type", 
+  "options": "\nRented\nOwned", 
+  "fieldname": "current_accommodation_type", 
+  "fieldtype": "Select", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Current Address", 
+  "fieldname": "current_address", 
+  "fieldtype": "Small Text", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Personal Details", 
+  "fieldname": "personal_details", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "width": "50%", 
+  "fieldname": "column_break5", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "PAN Number", 
+  "fieldname": "pan_number", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Passport Number", 
+  "fieldname": "passport_number", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Date of Issue", 
+  "fieldname": "date_of_issue", 
+  "fieldtype": "Date", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Valid Upto", 
+  "fieldname": "valid_upto", 
+  "fieldtype": "Date", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Button", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Salary Structure", 
+  "trigger": "Client", 
+  "fieldname": "salary_structure", 
+  "fieldtype": "Button", 
+  "hidden": 1, 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Place of Issue", 
+  "fieldname": "place_of_issue", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Marital Status", 
+  "options": "\nSingle\nMarried\nDivorced\nWidowed", 
+  "fieldname": "marital_status", 
+  "fieldtype": "Select", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Blood Group", 
+  "options": "\nA+\nA-\nB+\nB-\nAB+\nAB-\nO+\nO-", 
+  "fieldname": "blood_group", 
+  "fieldtype": "Select", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "width": "50%", 
+  "fieldname": "column_break6", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "description": "Here you can maintain family details like name and occupation of parent, spouse and children", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Family Background", 
+  "fieldname": "family_background", 
+  "fieldtype": "Small Text", 
+  "permlevel": 0
+ }, 
+ {
+  "description": "Here you can maintain height, weight, allergies, medical concerns etc", 
+  "colour": "White:FFF", 
+  "doctype": "DocField", 
+  "label": "Health Details", 
+  "fieldname": "health_details", 
+  "fieldtype": "Small Text", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Educational Qualification", 
+  "fieldname": "educational_qualification", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Educational Qualification Details", 
+  "options": "Employee Education", 
+  "fieldname": "educational_qualification_details", 
+  "fieldtype": "Table", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Career History", 
+  "fieldname": "career_history", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Previous Work Experience", 
+  "options": "Simple", 
+  "fieldname": "previous_work_experience", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Employee External Work History", 
+  "options": "Employee External Work History", 
+  "fieldname": "previous_experience_details", 
+  "fieldtype": "Table", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "History In Company", 
+  "options": "Simple", 
+  "fieldname": "history_in_company", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "label": "Employee Internal Work Historys", 
+  "options": "Employee Internal Work History", 
+  "fieldname": "experience_in_company_details", 
+  "fieldtype": "Table", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Section Break", 
+  "doctype": "DocField", 
+  "label": "Exit", 
+  "fieldname": "exit", 
+  "fieldtype": "Section Break", 
+  "permlevel": 0
+ }, 
+ {
+  "doctype": "DocField", 
+  "width": "50%", 
+  "fieldname": "column_break7", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "doctype": "DocField", 
+  "label": "Resignation Letter Date", 
+  "oldfieldname": "resignation_letter_date", 
+  "fieldname": "resignation_letter_date", 
+  "fieldtype": "Date", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "doctype": "DocField", 
+  "label": "Relieving Date", 
+  "oldfieldname": "relieving_date", 
+  "fieldname": "relieving_date", 
+  "fieldtype": "Date", 
+  "permlevel": 0, 
+  "in_filter": 1
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "Reason for Leaving", 
+  "oldfieldname": "reason_for_leaving", 
+  "fieldname": "reason_for_leaving", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Select", 
+  "doctype": "DocField", 
+  "label": "Leave Encashed?", 
+  "oldfieldname": "leave_encashed", 
+  "options": "\nYes\nNo", 
+  "fieldname": "leave_encashed", 
+  "fieldtype": "Select", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "doctype": "DocField", 
+  "label": "Encashment Date", 
+  "oldfieldname": "encashment_date", 
+  "fieldname": "encashment_date", 
+  "fieldtype": "Date", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Column Break", 
+  "doctype": "DocField", 
+  "label": "Exit Interview Details", 
+  "oldfieldname": "col_brk6", 
+  "width": "50%", 
+  "fieldname": "exit_interview_details", 
+  "fieldtype": "Column Break", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Date", 
+  "doctype": "DocField", 
+  "label": "Held On", 
+  "oldfieldname": "held_on", 
+  "fieldname": "held_on", 
+  "fieldtype": "Date", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Select", 
+  "doctype": "DocField", 
+  "label": "Reason for Resignation", 
+  "oldfieldname": "reason_for_resignation", 
+  "options": "\nBetter Prospects\nHealth Concerns", 
+  "fieldname": "reason_for_resignation", 
+  "fieldtype": "Select", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "New Workplace", 
+  "oldfieldname": "new_workplace", 
+  "fieldname": "new_workplace", 
+  "fieldtype": "Data", 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Text", 
+  "doctype": "DocField", 
+  "label": "Feedback", 
+  "oldfieldname": "feedback", 
+  "fieldname": "feedback", 
+  "fieldtype": "Small Text", 
+  "permlevel": 0
+ }, 
+ {
+  "print_hide": 1, 
+  "doctype": "DocField", 
+  "label": "File List", 
+  "fieldname": "file_list", 
+  "fieldtype": "Text", 
+  "hidden": 1, 
+  "permlevel": 0
+ }, 
+ {
+  "oldfieldtype": "Small Text", 
+  "doctype": "DocField", 
+  "label": "Trash Reason", 
+  "oldfieldname": "trash_reason", 
+  "fieldname": "trash_reason", 
+  "fieldtype": "Small Text", 
+  "permlevel": 1
+ }, 
+ {
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "write": 0, 
+  "role": "Employee", 
+  "cancel": 0, 
+  "permlevel": 0, 
+  "match": "employee"
+ }, 
+ {
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "write": 0, 
+  "role": "Employee", 
+  "cancel": 0, 
+  "permlevel": 1
+ }, 
+ {
+  "create": 1, 
+  "doctype": "DocPerm", 
+  "write": 1, 
+  "role": "HR User", 
+  "cancel": 1, 
+  "permlevel": 0, 
+  "match": "company"
+ }, 
+ {
+  "create": 1, 
+  "doctype": "DocPerm", 
+  "write": 1, 
+  "role": "HR Manager", 
+  "cancel": 1, 
+  "permlevel": 0
+ }, 
+ {
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "write": 0, 
+  "role": "HR User", 
+  "cancel": 0, 
+  "permlevel": 1
+ }, 
+ {
+  "create": 0, 
+  "doctype": "DocPerm", 
+  "write": 0, 
+  "role": "HR Manager", 
+  "cancel": 0, 
+  "permlevel": 1
+ }
 ]
\ No newline at end of file
diff --git a/hr/doctype/employee_external_work_history/employee_external_work_history.txt b/hr/doctype/employee_external_work_history/employee_external_work_history.txt
index 167675a..8587320 100644
--- a/hr/doctype/employee_external_work_history/employee_external_work_history.txt
+++ b/hr/doctype/employee_external_work_history/employee_external_work_history.txt
@@ -1,120 +1,75 @@
-# DocType, Employee External Work History
 [
-
-	# These values are common in all dictionaries
-	{
-		'creation': '2012-03-27 14:35:59',
-		'docstatus': 0,
-		'modified': '2012-03-27 14:35:59',
-		'modified_by': u'Administrator',
-		'owner': u'Administrator'
-	},
-
-	# These values are common for all DocType
-	{
-		'colour': u'White:FFF',
-		'doctype': 'DocType',
-		'istable': 1,
-		'module': u'HR',
-		'name': '__common__',
-		'section_style': u'Simple',
-		'server_code_error': u' ',
-		'show_in_menu': 0,
-		'version': 3
-	},
-
-	# These values are common for all DocField
-	{
-		'doctype': u'DocField',
-		'name': '__common__',
-		'parent': u'Employee External Work History',
-		'parentfield': u'fields',
-		'parenttype': u'DocType',
-		'permlevel': 0
-	},
-
-	# These values are common for all DocPerm
-	{
-		'create': 1,
-		'doctype': u'DocPerm',
-		'name': '__common__',
-		'parent': u'Employee External Work History',
-		'parentfield': u'permissions',
-		'parenttype': u'DocType',
-		'permlevel': 0,
-		'read': 1,
-		'role': u'All',
-		'write': 1
-	},
-
-	# DocType, Employee External Work History
-	{
-		'doctype': 'DocType',
-		'name': u'Employee External Work History'
-	},
-
-	# DocPerm
-	{
-		'doctype': u'DocPerm'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'company_name',
-		'fieldtype': u'Data',
-		'label': u'Company',
-		'oldfieldname': u'company_name',
-		'oldfieldtype': u'Data'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'designation',
-		'fieldtype': u'Data',
-		'label': u'Designation',
-		'oldfieldname': u'designation',
-		'oldfieldtype': u'Data'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'salary',
-		'fieldtype': u'Currency',
-		'label': u'Salary',
-		'oldfieldname': u'salary',
-		'oldfieldtype': u'Currency'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'address',
-		'fieldtype': u'Small Text',
-		'label': u'Address',
-		'oldfieldname': u'address',
-		'oldfieldtype': u'Small Text'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'contact',
-		'fieldtype': u'Data',
-		'label': u'Contact',
-		'oldfieldname': u'contact',
-		'oldfieldtype': u'Data'
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'total_experience',
-		'fieldtype': u'Data',
-		'label': u'Total Experience',
-		'oldfieldname': u'total_experience',
-		'oldfieldtype': u'Data'
-	}
+ {
+  "owner": "Administrator", 
+  "docstatus": 0, 
+  "creation": "2012-07-03 13:29:41", 
+  "modified_by": "Administrator", 
+  "modified": "2012-11-30 11:57:58"
+ }, 
+ {
+  "istable": 1, 
+  "name": "__common__", 
+  "doctype": "DocType", 
+  "module": "HR"
+ }, 
+ {
+  "name": "__common__", 
+  "parent": "Employee External Work History", 
+  "doctype": "DocField", 
+  "parenttype": "DocType", 
+  "permlevel": 0, 
+  "parentfield": "fields"
+ }, 
+ {
+  "name": "Employee External Work History", 
+  "doctype": "DocType"
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "Company", 
+  "oldfieldname": "company_name", 
+  "fieldname": "company_name", 
+  "fieldtype": "Data"
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "Designation", 
+  "oldfieldname": "designation", 
+  "fieldname": "designation", 
+  "fieldtype": "Data"
+ }, 
+ {
+  "oldfieldtype": "Currency", 
+  "doctype": "DocField", 
+  "label": "Salary", 
+  "oldfieldname": "salary", 
+  "fieldname": "salary", 
+  "fieldtype": "Currency"
+ }, 
+ {
+  "oldfieldtype": "Small Text", 
+  "doctype": "DocField", 
+  "label": "Address", 
+  "oldfieldname": "address", 
+  "fieldname": "address", 
+  "fieldtype": "Small Text"
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "Contact", 
+  "oldfieldname": "contact", 
+  "fieldname": "contact", 
+  "fieldtype": "Data"
+ }, 
+ {
+  "oldfieldtype": "Data", 
+  "doctype": "DocField", 
+  "label": "Total Experience", 
+  "oldfieldname": "total_experience", 
+  "fieldname": "total_experience", 
+  "fieldtype": "Data"
+ }
 ]
\ No newline at end of file
diff --git a/patches/november_2012/add_employee_field_in_employee.py b/patches/november_2012/add_employee_field_in_employee.py
new file mode 100644
index 0000000..c8e5b36
--- /dev/null
+++ b/patches/november_2012/add_employee_field_in_employee.py
@@ -0,0 +1,6 @@
+import webnotes
+
+def execute():
+	webnotes.clear_perms("Employee")
+	webnotes.reload_doc("hr", "doctype", "employee")
+	webnotes.conn.sql("""update tabEmployee set employee=name""")
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 3128948..1492124 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -689,4 +689,8 @@
 		'patch_module': 'patches.november_2012',
 		'patch_file': 'add_theme_to_profile',
 	},
+	{
+		'patch_module': 'patches.november_2012',
+		'patch_file': 'add_employee_field_in_employee',
+	},
 ]
\ No newline at end of file