[fixes] offer letter
diff --git a/erpnext/hr/doctype/job_applicant/job_applicant.js b/erpnext/hr/doctype/job_applicant/job_applicant.js
index ee0acc5..ed594d9 100644
--- a/erpnext/hr/doctype/job_applicant/job_applicant.js
+++ b/erpnext/hr/doctype/job_applicant/job_applicant.js
@@ -5,7 +5,3 @@
 
 // for communication
 cur_frm.email_field = "email_id";
-cur_frm.cscript = {
-	refresh: function(doc) {
-	},
-}
diff --git a/erpnext/hr/doctype/offer_letter/offer_letter.js b/erpnext/hr/doctype/offer_letter/offer_letter.js
index 7979efd..62cfc83 100644
--- a/erpnext/hr/doctype/offer_letter/offer_letter.js
+++ b/erpnext/hr/doctype/offer_letter/offer_letter.js
@@ -1,26 +1,10 @@
 // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
 // License: GNU General Public License v3. See license.txt
 
-cur_frm.cscript.job_applicant = function() {
-	frappe.call({
-		doc: cur_frm.doc,
-		method: "set_applicant_name",
-		callback: function(r) {
-			if(!r.exe){
-				refresh_field("applicant_name");
-			}
-		}
-	});
-}
-
-cur_frm.cscript.terms = function() {
-	frappe.call({
-		doc: cur_frm.doc,
-		method: "set_view_terms",
-		callback: function(r) {
-			if(!r.exe){
-				refresh_field("view_terms");
-			}
-		}
-	});
-}
\ No newline at end of file
+frappe.ui.form.on("Offer Letter", {
+	select_terms: function(frm) {
+		frappe.model.get_value("Terms and Conditions", frm.doc.select_terms, "terms", function(value) {
+			frm.set_value("terms", value.terms);
+		});
+	}
+});
diff --git a/erpnext/hr/doctype/offer_letter/offer_letter.json b/erpnext/hr/doctype/offer_letter/offer_letter.json
index 7e2baa3..4014c44 100644
--- a/erpnext/hr/doctype/offer_letter/offer_letter.json
+++ b/erpnext/hr/doctype/offer_letter/offer_letter.json
@@ -1,8 +1,8 @@
 {
  "allow_copy": 0, 
- "allow_import": 0, 
+ "allow_import": 1, 
  "allow_rename": 0, 
- "autoname": "OL-.######", 
+ "autoname": "Offer-.#####", 
  "creation": "2015-03-04 14:20:17.662207", 
  "custom": 0, 
  "docstatus": 0, 
@@ -22,7 +22,7 @@
    "options": "Job Applicant", 
    "permlevel": 0, 
    "precision": "", 
-   "print_hide": 0, 
+   "print_hide": 1, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 1, 
@@ -33,6 +33,7 @@
    "fieldname": "applicant_name", 
    "fieldtype": "Data", 
    "label": "Applicant Name", 
+   "options": "job_applicant.applicant_name", 
    "permlevel": 0, 
    "precision": "", 
    "read_only": 1
@@ -49,7 +50,8 @@
    "label": "Status", 
    "options": "Awaiting Response\nAccepted\nRejected ", 
    "permlevel": 0, 
-   "precision": ""
+   "precision": "", 
+   "print_hide": 1
   }, 
   {
    "allow_on_submit": 0, 
@@ -159,7 +161,8 @@
    "label": "Company", 
    "options": "Company", 
    "permlevel": 0, 
-   "precision": ""
+   "precision": "", 
+   "print_hide": 1
   }, 
   {
    "fieldname": "section_break_14", 
@@ -169,18 +172,18 @@
   }, 
   {
    "allow_on_submit": 0, 
-   "fieldname": "terms", 
+   "fieldname": "select_terms", 
    "fieldtype": "Link", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "in_filter": 0, 
    "in_list_view": 0, 
-   "label": "Terms", 
+   "label": "Select Terms", 
    "no_copy": 0, 
    "options": "Terms and Conditions", 
    "permlevel": 0, 
    "precision": "", 
-   "print_hide": 0, 
+   "print_hide": 1, 
    "read_only": 0, 
    "report_hide": 0, 
    "reqd": 0, 
@@ -188,10 +191,10 @@
    "set_only_once": 0
   }, 
   {
-   "fieldname": "view_terms", 
+   "fieldname": "terms", 
    "fieldtype": "Text Editor", 
-   "label": "View Terms", 
-   "options": "view_terms", 
+   "label": "Terms", 
+   "options": "", 
    "permlevel": 0, 
    "precision": ""
   }, 
@@ -213,7 +216,7 @@
  "is_submittable": 1, 
  "issingle": 0, 
  "istable": 0, 
- "modified": "2015-03-04 16:30:16.012258", 
+ "modified": "2015-03-05 00:54:34.719300", 
  "modified_by": "Administrator", 
  "module": "HR", 
  "name": "Offer Letter", 
@@ -227,24 +230,17 @@
    "create": 1, 
    "delete": 1, 
    "email": 0, 
-   "export": 0, 
-   "import": 0, 
+   "export": 1, 
+   "import": 1, 
    "permlevel": 0, 
-   "print": 0, 
+   "print": 1, 
    "read": 1, 
-   "report": 0, 
-   "role": "HR Manager", 
+   "report": 1, 
+   "role": "HR User", 
    "set_user_permissions": 0, 
    "share": 0, 
    "submit": 1, 
    "write": 1
-  }, 
-  {
-   "create": 1, 
-   "permlevel": 0, 
-   "read": 1, 
-   "role": "HR User", 
-   "write": 1
   }
  ], 
  "read_only": 0, 
diff --git a/erpnext/hr/doctype/offer_letter/offer_letter.py b/erpnext/hr/doctype/offer_letter/offer_letter.py
index ddf9459..b3eb865 100644
--- a/erpnext/hr/doctype/offer_letter/offer_letter.py
+++ b/erpnext/hr/doctype/offer_letter/offer_letter.py
@@ -6,11 +6,4 @@
 from frappe.model.document import Document
 
 class OfferLetter(Document):
-	def validate(self):
-		self.set_applicant_name()
-		
-	def set_applicant_name(self):
-		self.applicant_name = frappe.db.get_value("Job Applicant", self.job_applicant, "applicant_name")
-		
-	def set_view_terms(self):
-		self.view_terms = frappe.db.get_value("Terms and Conditions", self.terms, "terms")
\ No newline at end of file
+	pass