Rushabh Mehta | 3966f1d | 2012-02-23 12:35:32 +0530 | [diff] [blame] | 1 | # ERPNext - web based ERP (http://erpnext.com) |
| 2 | # Copyright (C) 2012 Web Notes Technologies Pvt Ltd |
| 3 | # |
| 4 | # This program is free software: you can redistribute it and/or modify |
| 5 | # it under the terms of the GNU General Public License as published by |
| 6 | # the Free Software Foundation, either version 3 of the License, or |
| 7 | # (at your option) any later version. |
| 8 | # |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | # GNU General Public License for more details. |
| 13 | # |
| 14 | # You should have received a copy of the GNU General Public License |
| 15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | |
Anand Doshi | 486f9df | 2012-07-19 13:40:31 +0530 | [diff] [blame] | 17 | from __future__ import unicode_literals |
Rushabh Mehta | 1a35574 | 2012-02-23 11:46:28 +0530 | [diff] [blame] | 18 | import webnotes |
Anand Doshi | db62876 | 2012-02-24 17:56:00 +0530 | [diff] [blame] | 19 | import _mysql_exceptions |
Rushabh Mehta | 1a35574 | 2012-02-23 11:46:28 +0530 | [diff] [blame] | 20 | |
| 21 | def execute(): |
| 22 | from webnotes.modules import reload_doc |
| 23 | reload_doc('accounts', 'page', 'accounts_home') |
| 24 | reload_doc('selling', 'page', 'selling_home') |
| 25 | reload_doc('buying', 'page', 'buying_home') |
| 26 | reload_doc('stock', 'page', 'stock_home') |
| 27 | reload_doc('hr', 'page', 'hr_home') |
| 28 | reload_doc('support', 'page', 'support_home') |
| 29 | reload_doc('production', 'page', 'production_home') |
| 30 | reload_doc('projects', 'page', 'projects_home') |
| 31 | reload_doc('website', 'page', 'website_home') |
Anand Doshi | eaaf651 | 2012-02-24 15:29:07 +0530 | [diff] [blame] | 32 | reload_doc('home', 'page', 'desktop') |
Anand Doshi | db62876 | 2012-02-24 17:56:00 +0530 | [diff] [blame] | 33 | reload_doc('utilities', 'page', 'todo') |
| 34 | reload_doc('utilities', 'page', 'calendar') |
Anand Doshi | 2b8c4d7 | 2012-02-27 18:42:00 +0530 | [diff] [blame] | 35 | reload_doc('utilities', 'page', 'messages') |
Rushabh Mehta | 1572adf | 2012-02-29 15:19:20 +0530 | [diff] [blame] | 36 | reload_doc('setup', 'page', 'modules_setup') |
Rushabh Mehta | 12852e7 | 2012-02-29 15:11:06 +0530 | [diff] [blame] | 37 | reload_doc('utilities', 'page', 'users') |
Rushabh Mehta | 1572adf | 2012-02-29 15:19:20 +0530 | [diff] [blame] | 38 | reload_doc('home', 'page', 'activity') |
Rushabh Mehta | fe521fd | 2012-03-01 13:39:09 +0530 | [diff] [blame] | 39 | reload_doc('home', 'page', 'attributions') |
Rushabh Mehta | 412a65c | 2012-02-29 18:38:18 +0530 | [diff] [blame] | 40 | reload_doc('core', 'doctype', 'profile') |
Rushabh Mehta | 1a35574 | 2012-02-23 11:46:28 +0530 | [diff] [blame] | 41 | |
Rushabh Mehta | cc6398e | 2012-03-01 12:15:54 +0530 | [diff] [blame] | 42 | # update user_image in profile |
| 43 | for p in webnotes.conn.sql("""select name, file_list from tabProfile |
| 44 | where ifnull(file_list,'')!=''"""): |
| 45 | fid = p[1].split('\n')[0].split(',')[1] |
| 46 | webnotes.conn.set_value('Profile', p[0], 'user_image', fid) |
| 47 | |
Anand Doshi | 40ee8d6 | 2012-02-24 19:21:47 +0530 | [diff] [blame] | 48 | webnotes.conn.set_value('Control Panel', 'Control Panel', 'home_page', |
| 49 | 'desktop') |
| 50 | |
Rushabh Mehta | 1a35574 | 2012-02-23 11:46:28 +0530 | [diff] [blame] | 51 | webnotes.conn.commit() |
Anand Doshi | db62876 | 2012-02-24 17:56:00 +0530 | [diff] [blame] | 52 | |
| 53 | try: |
| 54 | webnotes.conn.sql("""create table __SchedulerLog ( |
| 55 | `timestamp` timestamp, |
| 56 | method varchar(200), |
| 57 | error text |
| 58 | ) engine=MyISAM""") |
| 59 | except _mysql_exceptions.OperationalError, e: |
| 60 | pass |