diff --git a/erpnext/patches/june_2012/fetch_organization_from_lead.py b/erpnext/patches/june_2012/fetch_organization_from_lead.py new file mode 100644 index 00000000000..d40099731dd --- /dev/null +++ b/erpnext/patches/june_2012/fetch_organization_from_lead.py @@ -0,0 +1,3 @@ +def execute(): + import webnotes + webnotes.conn.sql("update `tabQuotation` t1, `tabLead` t2 set t1.organization = t2.company where ifnull(t1.lead, '') = '' and t1.quotation_to = 'Lead' and ifnull(t1.organization, '') = '' and t1.lead = t2.name") \ No newline at end of file diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 96bf161197f..7404b558896 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -422,4 +422,9 @@ patch_list = [ 'patch_file': 'copy_uom_for_pur_inv_item', 'description': 'Copy uom for pur inv item from PO and PR item table' }, + { + 'patch_module': 'patches.june_2012', + 'patch_file': 'fetch_organization_from_lead', + 'description': 'Fetch organization from lead in quote' + }, ] \ No newline at end of file