From 3b9f943335f2b6badbdb681c5dd6149bdbd8165f Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 17 Jun 2022 18:54:42 +0530 Subject: [PATCH 1/3] fix: Quotation lost update (cherry picked from commit 02f9441e1ab74a83c355cd546d1c0669dc21ef7e) # Conflicts: # erpnext/selling/doctype/quotation/quotation.py --- erpnext/selling/doctype/quotation/quotation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index ceb922c0e53..f967b187f80 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -115,8 +115,13 @@ class Quotation(SellingController): opp.set_status(status=status, update=True) @frappe.whitelist() +<<<<<<< HEAD def declare_enquiry_lost(self, lost_reasons_list, detailed_reason=None): if not self.has_sales_order(): +======= + def declare_enquiry_lost(self, lost_reasons_list, competitors, detailed_reason=None): + if not self.is_fully_ordered() or self.is_partially_ordered(): +>>>>>>> 02f9441e1a (fix: Quotation lost update) get_lost_reasons = frappe.get_list("Quotation Lost Reason", fields=["name"]) lost_reasons_lst = [reason.get("name") for reason in get_lost_reasons] frappe.db.set(self, "status", "Lost") From 8d63abb442d98121002230d330219791091b3bd5 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Fri, 17 Jun 2022 18:56:53 +0530 Subject: [PATCH 2/3] chore: fix condition (cherry picked from commit e457288dbaceda121fb35eeeacc4189a15d0f9f6) # Conflicts: # erpnext/selling/doctype/quotation/quotation.py --- erpnext/selling/doctype/quotation/quotation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index f967b187f80..e1aa03e41de 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -120,8 +120,12 @@ class Quotation(SellingController): if not self.has_sales_order(): ======= def declare_enquiry_lost(self, lost_reasons_list, competitors, detailed_reason=None): +<<<<<<< HEAD if not self.is_fully_ordered() or self.is_partially_ordered(): >>>>>>> 02f9441e1a (fix: Quotation lost update) +======= + if not (self.is_fully_ordered() or self.is_partially_ordered()): +>>>>>>> e457288dba (chore: fix condition) get_lost_reasons = frappe.get_list("Quotation Lost Reason", fields=["name"]) lost_reasons_lst = [reason.get("name") for reason in get_lost_reasons] frappe.db.set(self, "status", "Lost") From 8e2e61ef84561391b57fb74c9c4ff50e2a97a4bb Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Sat, 18 Jun 2022 20:23:58 +0530 Subject: [PATCH 3/3] chore: resolve conflicts --- erpnext/selling/doctype/quotation/quotation.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py index e1aa03e41de..d1530395d8a 100644 --- a/erpnext/selling/doctype/quotation/quotation.py +++ b/erpnext/selling/doctype/quotation/quotation.py @@ -115,17 +115,8 @@ class Quotation(SellingController): opp.set_status(status=status, update=True) @frappe.whitelist() -<<<<<<< HEAD def declare_enquiry_lost(self, lost_reasons_list, detailed_reason=None): - if not self.has_sales_order(): -======= - def declare_enquiry_lost(self, lost_reasons_list, competitors, detailed_reason=None): -<<<<<<< HEAD - if not self.is_fully_ordered() or self.is_partially_ordered(): ->>>>>>> 02f9441e1a (fix: Quotation lost update) -======= if not (self.is_fully_ordered() or self.is_partially_ordered()): ->>>>>>> e457288dba (chore: fix condition) get_lost_reasons = frappe.get_list("Quotation Lost Reason", fields=["name"]) lost_reasons_lst = [reason.get("name") for reason in get_lost_reasons] frappe.db.set(self, "status", "Lost")