leave application: status no_copy and draft on Open
This commit is contained in:
parent
2fd32859e7
commit
0ea130a97c
@ -19,6 +19,9 @@ cur_frm.add_fetch('employee','employee_name','employee_name');
|
||||
cur_frm.cscript.onload = function(doc, dt, dn) {
|
||||
if(!doc.posting_date)
|
||||
set_multiple(dt,dn,{posting_date:get_today()});
|
||||
if(doc.__islocal) {
|
||||
cur_frm.set_value("status", "Open")
|
||||
}
|
||||
cur_frm.call({
|
||||
method:"get_approver_list",
|
||||
callback: function(r) {
|
||||
@ -29,6 +32,9 @@ cur_frm.cscript.onload = function(doc, dt, dn) {
|
||||
}
|
||||
|
||||
cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||
if(doc.__islocal) {
|
||||
cur_frm.set_value("status", "Open")
|
||||
}
|
||||
cur_frm.set_intro("");
|
||||
if(doc.__islocal && !in_list(user_roles, "HR User")) {
|
||||
cur_frm.set_intro("Fill the form and save it")
|
||||
|
@ -2,9 +2,9 @@
|
||||
{
|
||||
"owner": "Administrator",
|
||||
"docstatus": 0,
|
||||
"creation": "2012-12-05 14:11:53",
|
||||
"creation": "2012-12-06 15:56:41",
|
||||
"modified_by": "Administrator",
|
||||
"modified": "2012-12-05 17:38:26"
|
||||
"modified": "2012-12-07 10:23:53"
|
||||
},
|
||||
{
|
||||
"is_submittable": 1,
|
||||
@ -39,6 +39,7 @@
|
||||
"colour": "White:FFF",
|
||||
"doctype": "DocField",
|
||||
"label": "Status",
|
||||
"no_copy": 1,
|
||||
"options": "Open\nApproved\nRejected",
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
|
Loading…
x
Reference in New Issue
Block a user