[forms] cleanup, fixing usability and added form dashboard

This commit is contained in:
Rushabh Mehta
2013-07-02 18:13:26 +05:30
parent d420401ba3
commit 2eb7ceabda
9 changed files with 116 additions and 18 deletions

View File

@@ -26,8 +26,16 @@ wn.require('app/utilities/doctype/sms_control/sms_control.js');
wn.require('app/selling/doctype/sales_common/sales_common.js');
erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
onload: function(doc, dt, dn) {
this._super(doc, dt, dn);
if(doc.customer && !doc.quotation_to)
doc.quotation_to = "Customer";
else if(doc.lead && !doc.quotation_to)
doc.quotation_to = "Lead";
},
refresh: function(doc, dt, dn) {
this._super();
this._super(doc, dt, dn);
if(doc.docstatus == 1 && doc.status!='Order Lost') {
cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']);

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-05-24 19:29:08",
"docstatus": 0,
"modified": "2013-06-28 12:47:10",
"modified": "2013-07-02 16:49:52",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -42,6 +42,12 @@
"doctype": "DocType",
"name": "Quotation"
},
{
"doctype": "DocField",
"fieldname": "customer_section",
"fieldtype": "Section Break",
"label": "Customer"
},
{
"doctype": "DocField",
"fieldname": "column_break0",