diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index dcd20917796..6be55756c45 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -39,16 +39,16 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ onload: function(doc, dt, dn) { var me = this; 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"; + // 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(doc, dt, dn); - doctype = doc.quotation_to == 'Customer' ? 'Customer':'Lead'; - frappe.dynamic_link = {doc: this.frm.doc, fieldname: doctype.toLowerCase(), doctype: doctype} + // doctype = doc.quotation_to == 'Customer' ? 'Customer':'Lead'; + // frappe.dynamic_link = {doc: this.frm.doc, fieldname: doctype.toLowerCase(), doctype: doctype} var me = this; diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index cea2b356c0d..2a04ca68126 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -28,7 +28,6 @@ class Quotation(SellingController): self.update_opportunity() self.validate_order_type() self.validate_uom_is_integer("stock_uom", "qty") - # self.validate_quotation_to() self.validate_valid_till() if self.items: self.with_items = 1 @@ -43,13 +42,6 @@ class Quotation(SellingController): def validate_order_type(self): super(Quotation, self).validate_order_type() - # def validate_quotation_to(self): - # if self.customer: - # self.quotation_to = "Customer" - # self.lead = None - # elif self.lead: - # self.quotation_to = "Lead" - def update_lead(self): if self.quotation_to == "Lead": frappe.get_doc("Lead", self.customer_lead).set_status(update=True)