fix: resetting lost reason in opportunity and quotation (#22378) (#22381)

(cherry picked from commit 71da90034d)

Co-authored-by: Anupam Kumar <anupamvns0099@gmail.com>
This commit is contained in:
mergify[bot]
2020-06-23 10:45:08 +05:30
committed by GitHub
parent 578bdff141
commit 57a0fa5e87
2 changed files with 3 additions and 0 deletions

View File

@@ -95,6 +95,7 @@ frappe.ui.form.on("Opportunity", {
});
} else {
frm.add_custom_button(__("Reopen"), function() {
frm.set_value("lost_reasons",[])
frm.set_value("status", "Open");
frm.save();
});

View File

@@ -92,6 +92,8 @@ class Quotation(SellingController):
self.update_lead()
def on_cancel(self):
if self.lost_reasons:
self.lost_reasons = []
super(Quotation, self).on_cancel()
#update enquiry status