Rushabh Mehta | ad45e31 | 2013-11-20 12:59:58 +0530 | [diff] [blame] | 1 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors |
Rushabh Mehta | e67d1fb | 2013-08-05 14:59:54 +0530 | [diff] [blame] | 2 | # License: GNU General Public License v3. See license.txt |
| 3 | |
Rushabh Mehta | 5f1d57e | 2012-12-27 14:05:02 +0530 | [diff] [blame] | 4 | import webnotes |
| 5 | |
| 6 | def execute(): |
Anand Doshi | a773e52 | 2012-12-27 18:10:45 +0530 | [diff] [blame] | 7 | webnotes.reload_doc("utilities", "doctype", "address") |
| 8 | |
Rushabh Mehta | 5f1d57e | 2012-12-27 14:05:02 +0530 | [diff] [blame] | 9 | webnotes.conn.sql("""update tabAddress set address_title = customer_name where ifnull(customer_name,'')!=''""") |
| 10 | webnotes.conn.sql("""update tabAddress set address_title = supplier_name where ifnull(supplier_name,'')!=''""") |
Anand Doshi | d9f44e2 | 2012-12-27 19:11:04 +0530 | [diff] [blame] | 11 | webnotes.conn.sql("""update tabAddress set address_title = sales_partner where ifnull(sales_partner,'')!=''""") |
Rushabh Mehta | 5f1d57e | 2012-12-27 14:05:02 +0530 | [diff] [blame] | 12 | |
| 13 | # move code to new doctype |
| 14 | webnotes.conn.set_value("Website Script", None, "javascript", |
| 15 | webnotes.conn.get_value("Website Settings", None, "startup_code")) |