brotherton-erpnext/erpnext/patches/june_2012/fetch_organization_from_lead.py
2012-06-08 18:19:32 +05:30

3 lines
251 B
Python

def execute():
import webnotes
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")