From fb62bbf61af1e3cb0652382051bfcd24e6ad79b7 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Wed, 11 May 2022 16:05:19 +0530 Subject: [PATCH] fix: conflicts --- .../crm/doctype/opportunity/opportunity.py | 38 ++++--------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index c78aaffdfc4..676da31a63a 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -8,12 +8,7 @@ import frappe from frappe import _ from frappe.email.inbox import link_communication_to_document from frappe.model.mapper import get_mapped_doc -<<<<<<< HEAD -from frappe.utils import cint, cstr, get_fullname -======= -from frappe.query_builder import DocType -from frappe.utils import cint, flt, get_fullname ->>>>>>> 3f41cb762d (fix: allow to use formatting for the field to_discuss in opportunity) +from frappe.utils import cint, get_fullname from erpnext.accounts.party import get_party_account_currency from erpnext.setup.utils import get_exchange_rate @@ -196,41 +191,22 @@ class Opportunity(TransactionBase): opts.description = "" opts.contact_date = self.contact_date -<<<<<<< HEAD if self.party_name and self.opportunity_from == "Customer": if self.contact_person: - opts.description = "Contact " + cstr(self.contact_person) + opts.description = f"Contact {self.contact_person}" else: - opts.description = "Contact customer " + cstr(self.party_name) + opts.description = f"Contact customer {self.party_name}" elif self.party_name and self.opportunity_from == "Lead": if self.contact_display: - opts.description = "Contact " + cstr(self.contact_display) + opts.description = f"Contact {self.contact_display}" else: - opts.description = "Contact lead " + cstr(self.party_name) + opts.description = f"Contact lead {self.party_name}" opts.subject = opts.description - opts.description += ". By : " + cstr(self.contact_by) + opts.description += f". By : {self.contact_by}" if self.to_discuss: - opts.description += " To Discuss : " + cstr(self.to_discuss) -======= - if self.party_name and self.opportunity_from == "Customer": - if self.contact_person: - opts.description = f"Contact {self.contact_person}" - else: - opts.description = f"Contact customer {self.party_name}" - elif self.party_name and self.opportunity_from == "Lead": - if self.contact_display: - opts.description = f"Contact {self.contact_display}" - else: - opts.description = f"Contact lead {self.party_name}" - - opts.subject = opts.description - opts.description += f". By : {self.contact_by}" - - if self.to_discuss: - opts.description += f" To Discuss : {frappe.render_template(self.to_discuss, {'doc': self})}" ->>>>>>> 3f41cb762d (fix: allow to use formatting for the field to_discuss in opportunity) + opts.description += f" To Discuss : {frappe.render_template(self.to_discuss, {'doc': self})}" super(Opportunity, self).add_calendar_event(opts, force)