Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/patches/before_jan_2012/employeewise_balance_leave_report.py b/patches/before_jan_2012/employeewise_balance_leave_report.py
deleted file mode 100644
index 45b00ae..0000000
--- a/patches/before_jan_2012/employeewise_balance_leave_report.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-from __future__ import unicode_literals
-"""
- This patch changes criteria name
- of search criteria "employeewise_balance_leave_report"
- from "Employeewise Balance Leave Report"
- to "Employee Leave Balance Report"
-
- This patch never worked!!!
-"""
-def execute():
- from webnotes.model.doc import Document
- from webnotes.modules import reload_doc
- reload_doc('hr', 'search_criteria', 'employeewise_balance_leave_report')
- d = Document('Search Criteria', 'employeewise_balance_leave_report')
- d.criteria_name = 'Employee Leave Balance Report'
- d.description = 'Employeewise Balance Leave Report'
- d.save()
diff --git a/patches/november_2012/report_permissions.py b/patches/november_2012/report_permissions.py
new file mode 100644
index 0000000..0619761
--- /dev/null
+++ b/patches/november_2012/report_permissions.py
@@ -0,0 +1,6 @@
+import webnotes
+
+def execute():
+ webnotes.conn.sql("""update tabDocPerm set `write`=1 where
+ parent='Report'
+ and role in ('Administrator', 'Report Manager', 'System Manager')""")
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 1a9ebb1..abf7fae 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -659,4 +659,8 @@
'patch_module': 'patches.november_2012',
'patch_file': 'rename_employee_leave_balance_report',
},
+ {
+ 'patch_module': 'patches.november_2012',
+ 'patch_file': 'report_permissions',
+ },
]
diff --git a/public/js/startup.js b/public/js/startup.js
index 1d43f41..c845ab2 100644
--- a/public/js/startup.js
+++ b/public/js/startup.js
@@ -61,7 +61,7 @@
erpnext.complete_setup.show();
}
if(wn.boot.expires_on && in_list(user_roles, 'System Manager')) {
- var today = dateutil.str_to_obj(dateutil.get_today());
+ var today = dateutil.str_to_obj(wn.boot.server_date);
var expires_on = dateutil.str_to_obj(wn.boot.expires_on);
var diff = dateutil.get_diff(expires_on, today);
if (0 <= diff && diff <= 15) {