Merge pull request #315 from mayur-patel/master
Added default for Employee doctype with help of Anand Doshi
This commit is contained in:
commit
a1e44e4202
@ -71,7 +71,9 @@ class DocType:
|
|||||||
webnotes.conn.set_default("employee", self.doc.name, self.doc.user_id)
|
webnotes.conn.set_default("employee", self.doc.name, self.doc.user_id)
|
||||||
webnotes.conn.set_default("employee_name", self.doc.employee_name, self.doc.user_id)
|
webnotes.conn.set_default("employee_name", self.doc.employee_name, self.doc.user_id)
|
||||||
webnotes.conn.set_default("company", self.doc.company, self.doc.user_id)
|
webnotes.conn.set_default("company", self.doc.company, self.doc.user_id)
|
||||||
|
if self.doc.reports_to:
|
||||||
|
webnotes.conn.set_default("leave_approver", webnotes.conn.get_value("Employee", self.doc.reports_to, "user_id"), self.doc.user_id)
|
||||||
|
|
||||||
def update_profile(self):
|
def update_profile(self):
|
||||||
# add employee role if missing
|
# add employee role if missing
|
||||||
if not "Employee" in webnotes.conn.sql_list("""select role from tabUserRole
|
if not "Employee" in webnotes.conn.sql_list("""select role from tabUserRole
|
||||||
|
Loading…
Reference in New Issue
Block a user