From f77d448f97be04ada94510ba4a5cccdee84f0a7a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 20 Apr 2023 19:44:12 +0530 Subject: [PATCH] fix: Use set instead of db_set as it is called from validate --- 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 6a5fead0f826..2a8d65f48666 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -59,7 +59,7 @@ def map_fields(self): 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