brotherton-erpnext/patches/june_2012/fetch_organization_from_lead.py

4 lines
291 B
Python
Raw Normal View History

from __future__ import unicode_literals
2012-06-08 12:32:38 +00:00
def execute():
import webnotes
2012-06-08 12:49:32 +00:00
webnotes.conn.sql("update `tabQuotation` t1, `tabLead` t2 set t1.organization = t2.company_name where ifnull(t1.lead, '') != '' and t1.quotation_to = 'Lead' and ifnull(t1.organization, '') = '' and t1.lead = t2.name")