From 7357fc18173d80b1c6172df4da89ca0696a2d7a9 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 8 Jun 2012 18:02:38 +0530 Subject: [PATCH] fetch organization from lead to quote --- erpnext/patches/june_2012/fetch_organization_from_lead.py | 3 +++ erpnext/patches/patch_list.py | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 erpnext/patches/june_2012/fetch_organization_from_lead.py 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 0000000000..d40099731d --- /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 96bf161197..7404b55889 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