[quotation][improvement] when made from lead

This commit is contained in:
Nabin Hait
2013-04-02 18:13:20 +05:30
parent ff3106c7d4
commit 1e3fc88940
11 changed files with 198 additions and 115 deletions

View File

@@ -0,0 +1,15 @@
import webnotes
def execute():
webnotes.conn.sql("""update `tabQuotation` set customer_name = organization
where quotation_to = 'Lead' and ifnull(lead, '') != ''
and ifnull(organization, '') != ''""")
webnotes.conn.sql("""update `tabQuotation` set customer_name = lead_name
where quotation_to = 'Lead' and ifnull(lead, '') != ''
and ifnull(organization, '') = '' and ifnull(lead_name, '') != ''""")
webnotes.conn.sql("""update `tabQuotation` set contact_display = lead_name
where quotation_to = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""")
webnotes.conn.sql("""update `tabOpportunity` set contact_display = lead_name
where enquiry_from = 'Lead' and ifnull(lead, '') != '' and ifnull(lead_name, '') != ''""")