commit | 71da90034d876b8bf37be03c1332840871855ded | [log] [tgz] |
---|---|---|
author | Anupam Kumar <anupamvns0099@gmail.com> | Mon Jun 22 18:27:14 2020 +0530 |
committer | GitHub <noreply@github.com> | Mon Jun 22 18:27:14 2020 +0530 |
tree | ffd1c185a12e4ae53eb453a399c7143d18cdea75 | |
parent | be4fc1a78eff5b2d6616565cef6a3f0634f4bbde [diff] |
fix: resetting lost reason in opportunity and quotation (#22378)
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js index 0c9ba49..f1b8171 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.js +++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -96,6 +96,7 @@ }); } else { frm.add_custom_button(__("Reopen"), function() { + frm.set_value("lost_reasons",[]) frm.set_value("status", "Open"); frm.save(); });
diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index 0e771c3..449a968 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py
@@ -99,6 +99,8 @@ self.update_lead() def on_cancel(self): + if self.lost_reasons: + self.lost_reasons = [] super(Quotation, self).on_cancel() #update enquiry status