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

This commit is contained in:
Anupam Kumar 2020-06-22 18:27:14 +05:30 committed by GitHub
parent be4fc1a78e
commit 71da90034d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,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

@ -99,6 +99,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