added onload_post_render
This commit is contained in:
parent
3e03743250
commit
1d15c557a9
@ -43,14 +43,15 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.enquiry_from == 'Lead' && doc.lead) {
|
|
||||||
cur_frm.cscript.lead(doc,cdt,cdn);
|
|
||||||
}
|
|
||||||
|
|
||||||
// setup fetch
|
// setup fetch
|
||||||
cur_frm.cscript.set_fetch();
|
cur_frm.cscript.set_fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
|
||||||
|
if(doc.enquiry_from == 'Lead' && doc.lead) {
|
||||||
|
cur_frm.cscript.lead(doc,cdt,cdn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// fetch
|
// fetch
|
||||||
// ===============================================================
|
// ===============================================================
|
||||||
|
|||||||
@ -14,10 +14,6 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date());
|
if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date());
|
||||||
if (!doc.status) doc.status = 'Draft';
|
if (!doc.status) doc.status = 'Draft';
|
||||||
|
|
||||||
if(doc.__islocal){
|
|
||||||
cur_frm.cscript.get_default_schedule_date(doc);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(doc.__islocal){
|
if(doc.__islocal){
|
||||||
hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']);
|
hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']);
|
||||||
}
|
}
|
||||||
@ -26,6 +22,12 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
|
||||||
|
if(doc.__islocal){
|
||||||
|
cur_frm.cscript.get_default_schedule_date(doc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//========================== Refresh ===============================================================
|
//========================== Refresh ===============================================================
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||||
|
|
||||||
|
|||||||
@ -9,6 +9,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date())
|
if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date())
|
||||||
if (!doc.status) doc.status = 'Draft';
|
if (!doc.status) doc.status = 'Draft';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
|
||||||
// second call
|
// second call
|
||||||
if(doc.__islocal){
|
if(doc.__islocal){
|
||||||
cur_frm.cscript.get_item_defaults(doc);
|
cur_frm.cscript.get_item_defaults(doc);
|
||||||
|
|||||||
@ -16,15 +16,17 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
|
|||||||
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
|
||||||
if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
|
if(!doc.transaction_date) set_multiple(cdt,cdn,{transaction_date:get_today()});
|
||||||
|
|
||||||
if(doc.__islocal){
|
|
||||||
cur_frm.cscript.get_default_schedule_date(doc);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(doc.__islocal){
|
if(doc.__islocal){
|
||||||
hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']);
|
hide_field(['supplier_name','supplier_address','contact_person','address_display','contact_display','contact_mobile','contact_email']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
|
||||||
|
if(doc.__islocal){
|
||||||
|
cur_frm.cscript.get_default_schedule_date(doc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ================================== Refresh ==========================================
|
// ================================== Refresh ==========================================
|
||||||
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user