fix: Patch typo fix and set label in refresh
This commit is contained in:
@@ -6,5 +6,5 @@ import frappe
|
||||
|
||||
def execute():
|
||||
|
||||
frappe.db.dql(""" UPDATE `tabQuotation` set customer_lead = lead WHERE quotation_to = 'Lead' """)
|
||||
frappe.db.dql(""" UPDATE `tabQuotation` set customer_lead = customer WHERE quotation_to = 'Customer' """)
|
||||
frappe.db.sql(""" UPDATE `tabQuotation` set customer_lead = lead WHERE quotation_to = 'Lead' """)
|
||||
frappe.db.sql(""" UPDATE `tabQuotation` set customer_lead = customer WHERE quotation_to = 'Customer' """)
|
||||
@@ -22,11 +22,11 @@ frappe.ui.form.on('Quotation', {
|
||||
|
||||
refresh: function(frm) {
|
||||
frm.trigger("set_label");
|
||||
frm.trigger("set_dynamic_field_label");
|
||||
},
|
||||
|
||||
quotation_to: function(frm) {
|
||||
frm.trigger("set_label");
|
||||
frm.trigger("set_dynamic_field_label");
|
||||
frm.trigger("toggle_reqd_lead_customer");
|
||||
},
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
"in_global_search": 1,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 1,
|
||||
"label": "",
|
||||
"label": "Customer/Lead",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"oldfieldname": "customer",
|
||||
@@ -3224,7 +3224,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 1,
|
||||
"menu_index": 0,
|
||||
"modified": "2019-04-02 10:06:27.850280",
|
||||
"modified": "2019-04-02 10:18:58.506125",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Quotation",
|
||||
|
||||
@@ -43,7 +43,7 @@ class Quotation(SellingController):
|
||||
super(Quotation, self).validate_order_type()
|
||||
|
||||
def update_lead(self):
|
||||
if self.quotation_to == "Lead":
|
||||
if self.quotation_to == "Lead" and self.customer_lead:
|
||||
frappe.get_doc("Lead", self.customer_lead).set_status(update=True)
|
||||
|
||||
def update_opportunity(self):
|
||||
|
||||
Reference in New Issue
Block a user