From 8d8bbb0588d6f416e0a05f25561204a088c29645 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 15 Jul 2016 16:50:52 +0530 Subject: [PATCH] [bugfix] opportunity naming --- erpnext/crm/doctype/opportunity/opportunity.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/crm/doctype/opportunity/opportunity.py b/erpnext/crm/doctype/opportunity/opportunity.py index 69a04c6ffad..1e57878df67 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.py +++ b/erpnext/crm/doctype/opportunity/opportunity.py @@ -54,6 +54,7 @@ class Opportunity(TransactionBase): email_name = self.contact_email[0:self.contact_email.index('@')] email_split = email_name.split('.') + sender_name = '' for s in email_split: sender_name += s.capitalize() + ' ' @@ -189,11 +190,11 @@ def get_item_details(item_code): def make_quotation(source_name, target_doc=None): def set_missing_values(source, target): quotation = frappe.get_doc(target) - + company_currency = frappe.db.get_value("Company", quotation.company, "default_currency") - party_account_currency = get_party_account_currency("Customer", quotation.customer, + party_account_currency = get_party_account_currency("Customer", quotation.customer, quotation.company) if quotation.customer else company_currency - + quotation.currency = party_account_currency or company_currency if company_currency == quotation.currency: