added onload_post_render

This commit is contained in:
Rushabh Mehta
2011-06-24 09:51:58 +05:30
parent 3e03743250
commit 1d15c557a9
4 changed files with 21 additions and 13 deletions

View File

@@ -9,10 +9,13 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date())
if (!doc.status) doc.status = 'Draft';
}
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
// second call
if(doc.__islocal){
cur_frm.cscript.get_item_defaults(doc);
}
}
}
cur_frm.cscript.get_item_defaults = function(doc) {