Fixes in Activity Cost
diff --git a/erpnext/projects/doctype/activity_cost/activity_cost.js b/erpnext/projects/doctype/activity_cost/activity_cost.js
new file mode 100644
index 0000000..ba10153
--- /dev/null
+++ b/erpnext/projects/doctype/activity_cost/activity_cost.js
@@ -0,0 +1 @@
+cur_frm.add_fetch('employee', 'employee_name', 'employee_name');
\ No newline at end of file
diff --git a/erpnext/projects/doctype/activity_cost/activity_cost.json b/erpnext/projects/doctype/activity_cost/activity_cost.json
index 7f7720a..bdc147e 100644
--- a/erpnext/projects/doctype/activity_cost/activity_cost.json
+++ b/erpnext/projects/doctype/activity_cost/activity_cost.json
@@ -2,7 +2,7 @@
"allow_copy": 0,
"allow_import": 1,
"allow_rename": 1,
- "autoname": "Activity Cost - .#",
+ "autoname": "AC-.#####",
"creation": "2015-03-23 02:00:21.861546",
"custom": 0,
"docstatus": 0,
@@ -31,11 +31,12 @@
},
{
"fieldname": "employee_name",
- "fieldtype": "Read Only",
+ "fieldtype": "Data",
"label": "Employee Name",
- "options": "employee.employee_name",
+ "options": "",
"permlevel": 0,
- "precision": ""
+ "precision": "",
+ "read_only": 1
},
{
"fieldname": "column_break_2",
@@ -135,7 +136,7 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
- "modified": "2015-04-14 02:08:33.690406",
+ "modified": "2015-06-11 06:50:47.999788",
"modified_by": "Administrator",
"module": "Projects",
"name": "Activity Cost",
diff --git a/erpnext/projects/doctype/activity_cost/activity_cost.py b/erpnext/projects/doctype/activity_cost/activity_cost.py
index 121e650..8cd04f5 100644
--- a/erpnext/projects/doctype/activity_cost/activity_cost.py
+++ b/erpnext/projects/doctype/activity_cost/activity_cost.py
@@ -15,6 +15,8 @@
self.check_unique()
def set_title(self):
+ if not self.employee_name:
+ self.employee_name = frappe.db.get_value("Employee", self.employee, "employee_name")
self.title = _("{0} for {1}").format(self.employee_name, self.activity_type)
def check_unique(self):