From a22bd841eb662c712f82491f83f852923e8c4241 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Nov 2012 18:55:17 +0530 Subject: [PATCH 1/2] patch to update cancelled BOMs --- patches/november_2012/cancelled_bom_patch.py | 14 ++++++++++++++ patches/patch_list.py | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 patches/november_2012/cancelled_bom_patch.py diff --git a/patches/november_2012/cancelled_bom_patch.py b/patches/november_2012/cancelled_bom_patch.py new file mode 100644 index 00000000000..3420a087016 --- /dev/null +++ b/patches/november_2012/cancelled_bom_patch.py @@ -0,0 +1,14 @@ +import webnotes + +def execute(): + cancelled_boms = webnotes.conn.sql("""select name from `tabBOM` + where docstatus = 2""") + + for bom in cancelled_boms: + webnotes.conn.sql("""update `tabBOM` set is_default=0, is_active='No' + where name=%s""", (bom[0],)) + + webnotes.conn.sql("""update `tabItem` set default_bom=null + where default_bom=%s""", (bom[0],)) + + \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index f54de508856..d2e2a476fb5 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -683,4 +683,8 @@ patch_list = [ 'patch_module': 'patches.november_2012', 'patch_file': 'support_ticket_response_to_communication', }, + { + 'patch_module': 'patches.november_2012', + 'patch_file': 'cancelled_bom_patch', + }, ] \ No newline at end of file From 51b07855296f1078639e57c407063cbebf00acd1 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 27 Nov 2012 19:07:35 +0530 Subject: [PATCH 2/2] updated latest updates page --- home/page/latest_updates/latest_updates.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js index 9ba2015ce5c..e2b9c96f462 100644 --- a/home/page/latest_updates/latest_updates.js +++ b/home/page/latest_updates/latest_updates.js @@ -1,4 +1,7 @@ erpnext.updates = [ + ["27th November 2012", [ + "Communication: Made common communication thread and added it in Lead, Contact.", + ]], ["26th November 2012", [ "Email: Added User Signature", "Support Ticket: Added link to Lead / Contact. If incoming ticket is not from an existing Lead / Contact, create a new Lead",