query-report patch, now report manager can save, but must give a new name if standard report

This commit is contained in:
Rushabh Mehta 2012-11-12 12:53:44 +05:30
parent 13a0e4693e
commit 09a53376bb
3 changed files with 10 additions and 33 deletions

View File

@ -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()

View File

@ -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')""")

View File

@ -659,4 +659,8 @@ patch_list = [
'patch_module': 'patches.november_2012',
'patch_file': 'rename_employee_leave_balance_report',
},
{
'patch_module': 'patches.november_2012',
'patch_file': 'report_permissions',
},
]