Fixes in Activity Cost
This commit is contained in:
parent
1792ff3be7
commit
1f048b2426
1
erpnext/projects/doctype/activity_cost/activity_cost.js
Normal file
1
erpnext/projects/doctype/activity_cost/activity_cost.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
cur_frm.add_fetch('employee', 'employee_name', 'employee_name');
|
@ -2,7 +2,7 @@
|
|||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "Activity Cost - .#",
|
"autoname": "AC-.#####",
|
||||||
"creation": "2015-03-23 02:00:21.861546",
|
"creation": "2015-03-23 02:00:21.861546",
|
||||||
"custom": 0,
|
"custom": 0,
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
@ -31,11 +31,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "employee_name",
|
"fieldname": "employee_name",
|
||||||
"fieldtype": "Read Only",
|
"fieldtype": "Data",
|
||||||
"label": "Employee Name",
|
"label": "Employee Name",
|
||||||
"options": "employee.employee_name",
|
"options": "",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"precision": ""
|
"precision": "",
|
||||||
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break_2",
|
"fieldname": "column_break_2",
|
||||||
@ -135,7 +136,7 @@
|
|||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"modified": "2015-04-14 02:08:33.690406",
|
"modified": "2015-06-11 06:50:47.999788",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Activity Cost",
|
"name": "Activity Cost",
|
||||||
|
@ -15,6 +15,8 @@ class ActivityCost(Document):
|
|||||||
self.check_unique()
|
self.check_unique()
|
||||||
|
|
||||||
def set_title(self):
|
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)
|
self.title = _("{0} for {1}").format(self.employee_name, self.activity_type)
|
||||||
|
|
||||||
def check_unique(self):
|
def check_unique(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user