moved directory structure

This commit is contained in:
Rushabh Mehta
2012-09-24 19:13:42 +05:30
parent e47a6779e9
commit 2fa2f7178d
1637 changed files with 47 additions and 11450 deletions

View File

@@ -0,0 +1,24 @@
# dont run this patch
from __future__ import unicode_literals
def execute():
import webnotes
import webnotes.model.doctype
from webnotes.utils import cint
from webnotes.model.doc import Document
from webnotes.model.code import get_obj
doctype_list = webnotes.conn.sql("SELECT name FROM `tabDocType`")
for dt in doctype_list:
doclist = webnotes.model.doctype.get(dt[0], form=0)
is_submittable = 0
for d in doclist:
if d.doctype == 'DocPerm' and d.fields.get('permlevel') == 0 \
and cint(d.fields.get('submit')) == 1:
is_submittable = 1
break
if is_submittable:
dt_doc = Document('DocType', doclist[0].name)
dt_doc.is_submittable = 1
dt_doc.save()
obj = get_obj(doc=dt_doc)
obj.make_amendable()
obj.on_update()