From 25a4bd02f43be98b0b4fba085b669818dada6d1d Mon Sep 17 00:00:00 2001 From: Akhilesh Darjee Date: Tue, 24 Dec 2013 11:32:57 +0530 Subject: [PATCH] [fix] [minor] update item_name and description in item price --- patches/1312/p02_update_item_details_in_item_price.py | 10 ++++++++++ patches/patch_list.py | 1 + 2 files changed, 11 insertions(+) create mode 100644 patches/1312/p02_update_item_details_in_item_price.py diff --git a/patches/1312/p02_update_item_details_in_item_price.py b/patches/1312/p02_update_item_details_in_item_price.py new file mode 100644 index 0000000000..c19988c9ef --- /dev/null +++ b/patches/1312/p02_update_item_details_in_item_price.py @@ -0,0 +1,10 @@ +# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import webnotes + +def execute(): + webnotes.conn.sql("""update `tabItem Price` ip INNER JOIN `tabItem` i + ON (ip.item_code = i.name) + set ip.item_name = i.item_name, ip.item_description = i.description""") \ No newline at end of file diff --git a/patches/patch_list.py b/patches/patch_list.py index 49c0779872..608ba77168 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -262,4 +262,5 @@ patch_list = [ "patches.1311.p07_scheduler_errors_digest", "patches.1311.p08_email_digest_recipients", "execute:webnotes.delete_doc('DocType', 'Warehouse Type')", + "patches.1312.p02_update_item_details_in_item_price", ] \ No newline at end of file