added voucher import tool

This commit is contained in:
Rushabh Mehta
2012-09-26 19:00:02 +05:30
parent 47ee285ff9
commit 55fd5f3ed6
16 changed files with 281 additions and 539 deletions

View File

@@ -0,0 +1,15 @@
import webnotes
from webnotes.model.code import get_obj
from webnotes.model.doc import addchild
def execute():
existing = webnotes.conn.sql("""select name from `tabDocPerm`
where permlevel=0 and parent='Event' and role='System Manager'
and cancel=1""")
if not existing:
ev_obj = get_obj("DocType", "Event", with_children=1)
ch = addchild(ev_obj.doc, "permissions", "DocPerm")
ch.permlevel = 0
ch.role = 'System Manager'
ch.read = ch.write = ch.create = ch.cancel = 1
ch.save()

View File

@@ -0,0 +1,21 @@
# 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
def execute():
# reload gross profit report
from webnotes.modules import reload_doc
reload_doc('selling', 'search_criteria', 'gross_profit')

View File

@@ -0,0 +1,31 @@
# 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
def execute():
import webnotes
from webnotes.model.code import get_obj
bin = webnotes.conn.sql("select name from `tabBin`")
i=0
for d in bin:
try:
get_obj('Bin', d[0]).update_entries_after('2000-01-01', '12:05')
except:
pass
i += 1
if i%100 == 0:
webnotes.conn.sql("commit")
webnotes.conn.sql("start transaction")