From e7cefc4718d1936e188083d6661e35e3723f46bb Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 22 Jun 2011 11:59:34 +0530 Subject: [PATCH 1/3] Added patch number 288 to add Module Def 'Home' --- patches/patch.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/patches/patch.py b/patches/patch.py index de77b2d374..341c4846fa 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1,6 +1,6 @@ # REMEMBER to update this # ======================== -last_patch = 287 +last_patch = 288 #------------------------------------------- @@ -1147,3 +1147,11 @@ def execute(patch_no): reload_doc('accounts', 'search_criteria', 'itemwise_purchase_register') elif patch_no == 287: sql("update `tabDocField` set no_copy = 1 where fieldname in ('per_received', 'per_billed', 'per_delivered') and parent in ('Purchase Order', 'Purchase Receipt', 'Sales Order', 'Delivery Note')") + elif patch_no == 288: + count = sql("""SELECT * FROM `tabModule Def` + WHERE `module_name` LIKE 'Home'""") + if not count: + md = Document('Module Def') + md.module_name = 'Home' + md.module_label = 'Home' + md.save(1) From b9f7e39bb4afbbfa6f726e24ccb9abcd29cec7d4 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 22 Jun 2011 12:11:47 +0530 Subject: [PATCH 2/3] Modified patch.py - added patch to add module def 'Home' --- patches/patch.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/patches/patch.py b/patches/patch.py index b2230d4db5..2208851cae 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1,6 +1,6 @@ # REMEMBER to update this # ======================== -last_patch = 289 +last_patch = 290 #------------------------------------------- @@ -1152,3 +1152,11 @@ def execute(patch_no): elif patch_no == 289: sql("update `tabDocType` set subject = 'From %(supplier_name)s worth %(grand_total)s due on %(due_date)s | %(outstanding_amount)s outstanding' where name = 'Payable Voucher'") sql("update `tabDocType` set search_fields = 'status,transaction_date,customer,lead,order_type' where name = 'Quotation'") + elif patch_no == 290: + count = sql("""SELECT * FROM `tabModule Def` + WHERE `module_name` LIKE 'Home'""") + if not count: + md = Document('Module Def') + md.module_name = 'Home' + md.module_label = 'Home' + md.save(1) \ No newline at end of file From f14abfb0c77e6a93b6caed45fb5e67108e37fd42 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 22 Jun 2011 12:24:40 +0530 Subject: [PATCH 3/3] Added patch to add Module Def 'Home' where it does not exist --- patches/patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/patch.py b/patches/patch.py index 2208851cae..3bc3361062 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1153,7 +1153,7 @@ def execute(patch_no): sql("update `tabDocType` set subject = 'From %(supplier_name)s worth %(grand_total)s due on %(due_date)s | %(outstanding_amount)s outstanding' where name = 'Payable Voucher'") sql("update `tabDocType` set search_fields = 'status,transaction_date,customer,lead,order_type' where name = 'Quotation'") elif patch_no == 290: - count = sql("""SELECT * FROM `tabModule Def` + count = sql("""SELECT * FROM `tabModule Def` WHERE `module_name` LIKE 'Home'""") if not count: md = Document('Module Def')