From 665021270f337fd4f17418a914d53fb7ec83531f Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 20:04:28 +0530 Subject: [PATCH] fix: Use set instead of db_set as it is called from validate (#34967) fix: Use set instead of db_set as it is called from validate (#34967) (cherry picked from commit 72b5c1f70a51f18cda48c8e71602ee2d620e582b) Co-authored-by: Nabin Hait --- erpnext/crm/doctype/opportunity/opportunity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index f4b6e910ed1..cc4ee06072d 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -60,7 +60,7 @@ class Opportunity(TransactionBase, CRMNote): if not self.get(field) and frappe.db.field_exists(self.opportunity_from, field): try: value = frappe.db.get_value(self.opportunity_from, self.party_name, field) - self.db_set(field, value) + self.set(field, value) except Exception: continue