mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-28 22:28:24 +00:00
change from labels to fieldname in cur_frm.cscript
This commit is contained in:
@@ -88,7 +88,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||
unhide_field(fl); }
|
||||
}
|
||||
|
||||
cur_frm.cscript['Add'] = function(doc, dt, dn) {
|
||||
cur_frm.cscript.add = function(doc, dt, dn) {
|
||||
var callback = function(r,rt) {
|
||||
|
||||
// refresh listing
|
||||
|
||||
@@ -44,7 +44,7 @@ cur_frm.cscript.onload = function(doc,cdt,cdn){
|
||||
cur_frm.cscript.refresh = function(doc,cdt,cdn) {
|
||||
cur_frm.clear_custom_buttons();
|
||||
if(doc.status == 'Pending Review' && (doc.senders_name == user_fullname || doc.senders_email == user)) {
|
||||
cur_frm.add_custom_button('Declare Completed', cur_frm.cscript['Declare Completed']);
|
||||
cur_frm.add_custom_button('Declare Completed', cur_frm.cscript.declare_completed);
|
||||
cur_frm.add_custom_button('Reopen Task', cur_frm.cscript['Reopen Task']);
|
||||
}
|
||||
if(doc.status == 'Open' && !doc.__islocal) {
|
||||
@@ -111,7 +111,7 @@ cur_frm.cscript['Cancel Task'] = function(){
|
||||
});
|
||||
}
|
||||
|
||||
cur_frm.cscript['Declare Completed'] = function(){
|
||||
cur_frm.cscript.declare_completed = function(){
|
||||
$c_obj(make_doclist(cur_frm.doc.doctype, cur_frm.doc.name),'declare_completed', '',function(r, rt) {
|
||||
if(r.message == 'true'){
|
||||
doc.status = 'Closed'; //for refresh
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-30 13:33:31',
|
||||
'creation': '2012-04-03 12:49:51',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-30 13:33:31',
|
||||
'modified': '2012-04-03 12:49:51',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'ashwini@webnotestech.com'
|
||||
},
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-30 14:50:44',
|
||||
'creation': '2012-04-03 12:49:52',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-30 14:50:44',
|
||||
'modified': '2012-04-03 12:49:52',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'harshada@webnotestech.com'
|
||||
},
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-30 13:33:32',
|
||||
'creation': '2012-04-03 12:49:52',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-30 13:33:32',
|
||||
'modified': '2012-04-03 12:49:52',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'ashwini@webnotestech.com'
|
||||
},
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-30 13:33:32',
|
||||
'creation': '2012-04-03 12:49:52',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-30 13:33:32',
|
||||
'modified': '2012-04-03 12:49:52',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'ashwini@webnotestech.com'
|
||||
},
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-30 13:33:32',
|
||||
'creation': '2012-04-03 12:49:52',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-30 13:33:32',
|
||||
'modified': '2012-04-03 12:49:52',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'harshada@webnotestech.com'
|
||||
},
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-30 13:33:32',
|
||||
'creation': '2012-04-03 12:49:52',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-30 13:33:32',
|
||||
'modified': '2012-04-03 12:49:52',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'harshada@webnotestech.com'
|
||||
},
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
# These values are common in all dictionaries
|
||||
{
|
||||
'creation': '2012-03-30 14:50:44',
|
||||
'creation': '2012-04-03 12:49:53',
|
||||
'docstatus': 0,
|
||||
'modified': '2012-03-30 14:50:44',
|
||||
'modified': '2012-04-03 12:49:53',
|
||||
'modified_by': u'Administrator',
|
||||
'owner': u'ashwini@webnotestech.com'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user