[form] [legacy-js] removed old Dialog, PageHeader etc., cleanup Opportunity and Quotation

This commit is contained in:
Rushabh Mehta
2013-07-03 13:27:39 +05:30
parent 78979dca9b
commit 9a04b19160
9 changed files with 192 additions and 207 deletions

View File

@@ -40,9 +40,19 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
},
refresh: function() {
var doc = this.frm.doc;
erpnext.hide_naming_series();
this.frm.clear_custom_buttons();
this.frm.dashboard.reset(doc);
if(!doc.__islocal) {
if(doc.status=="Converted") {
this.frm.dashboard.set_headline_alert(wn._("Converted"), "alert-success", "icon-ok-sign");
} else {
this.frm.dashboard.set_headline_alert(wn._(doc.status), "alert-info", "icon-exclamation-sign");
}
}
this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer;
if(!this.frm.doc.__islocal && !this.frm.__is_customer) {
this.frm.add_custom_button("Create Customer", this.frm.cscript['Create Customer']);