blob: a99f92416fd997c55a744ba557a468e8377d89d7 [file] [log] [blame]
Rushabh Mehta3966f1d2012-02-23 12:35:32 +05301# 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 Doshi486f9df2012-07-19 13:40:31 +053017from __future__ import unicode_literals
Rushabh Mehta1a355742012-02-23 11:46:28 +053018import webnotes
Anand Doshidb628762012-02-24 17:56:00 +053019import _mysql_exceptions
Rushabh Mehta1a355742012-02-23 11:46:28 +053020
21def 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 Doshieaaf6512012-02-24 15:29:07 +053032 reload_doc('home', 'page', 'desktop')
Anand Doshidb628762012-02-24 17:56:00 +053033 reload_doc('utilities', 'page', 'todo')
34 reload_doc('utilities', 'page', 'calendar')
Anand Doshi2b8c4d72012-02-27 18:42:00 +053035 reload_doc('utilities', 'page', 'messages')
Rushabh Mehta1572adf2012-02-29 15:19:20 +053036 reload_doc('setup', 'page', 'modules_setup')
Rushabh Mehta12852e72012-02-29 15:11:06 +053037 reload_doc('utilities', 'page', 'users')
Rushabh Mehta1572adf2012-02-29 15:19:20 +053038 reload_doc('home', 'page', 'activity')
Rushabh Mehtafe521fd2012-03-01 13:39:09 +053039 reload_doc('home', 'page', 'attributions')
Rushabh Mehta412a65c2012-02-29 18:38:18 +053040 reload_doc('core', 'doctype', 'profile')
Rushabh Mehta1a355742012-02-23 11:46:28 +053041
Rushabh Mehtacc6398e2012-03-01 12:15:54 +053042 # 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 Doshi40ee8d62012-02-24 19:21:47 +053048 webnotes.conn.set_value('Control Panel', 'Control Panel', 'home_page',
49 'desktop')
50
Rushabh Mehta1a355742012-02-23 11:46:28 +053051 webnotes.conn.commit()
Anand Doshidb628762012-02-24 17:56:00 +053052
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