Hi,
On Leave Application page, we would like the name of the selected employee’s immediate manager (Report To field from employee) to be selected by default if it is one of the option in the drop-down list of Leave Approver. For example if x is manager of y and if x is a leave approver, when y is selected as Employee on Leave application page, we want system to select x as default on Leave application page for Leave Approver drop-down. How can we achieve this?
Mayur
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/8_k8NNCLZgMJ.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/__8WIcAaaEwJ.
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/SCgj3G_KZWgJ.
cur_frm.add_fetch('employee','user_id','reports_to_user_id')
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/DCTTwH1LkIoJ.
cur_frm.add_fetch('employee', 'reports_to_user_id', 'user_id')
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/MQ3ITAClgjkJ.
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/qs8_WfiCQOEJ.
As per your suggestion about elegant solution, are you saying that I need to add webnotes.conn.set_default("reports_to", self.doc.report_to, self.doc.user_id) in def update_user_default(self): of employee.py? what does this do?
Hi Rushabh,
I am logged in as Administrator. So by default, employee is not selected. But it still doesn't work when I select an employee. So basically it is not working.
One thing I forgot to mention that reports_to_user_id is defined as Hidden field for employee doctype. Not sure if this matters?
I can update the old records manually but I am interested in knowing how the value for reports_to_user_id will get populated in the database?
As per your suggestion about elegant solution, are you saying that I need to add webnotes.conn.set_default("reports_to", self.doc.report_to, self.doc.user_id) in def update_user_default(self): of employee.py? what does this do?
Mayur
On Friday, March 8, 2013 11:32:17 PM UTC+11, MP wrote:Hi,
On Leave Application page, we would like the name of the selected employee’s immediate manager (Report To field from employee) to be selected by default if it is one of the option in the drop-down list of Leave Approver. For example if x is manager of y and if x is a leave approver, when y is selected as Employee on Leave application page, we want system to select x as default on Leave application page for Leave Approver drop-down. How can we achieve this?
--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/l5RF_Rtw5fEJ.