This commit is contained in:
Rushabh Mehta
2013-01-23 19:44:35 +05:30
28 changed files with 93 additions and 319 deletions

View File

@@ -0,0 +1,4 @@
def execute():
import webnotes
webnotes.delete_doc("DocType", "Landed Cost Master")
webnotes.delete_doc("DocType", "Landed Cost Master Detail")

View File

@@ -0,0 +1,13 @@
def execute():
import webnotes
for dt in webnotes.conn.sql("""select name, issingle from tabDocType"""):
if dt[1]:
webnotes.conn.sql("""update tabDocPerm set report = 0 where parent = %s""", dt[0])
doctype = webnotes.model_wrapper("DocType", dt[0])
for pl in [1, 2, 3]:
if not doctype.doclist.get({"doctype": "DocField", "permlevel": pl}):
if doctype.doclist.get({"doctype":"DocPerm", "permlevel":pl}):
webnotes.conn.sql("""delete from `tabDocPerm`
where parent = %s and permlevel = %s""", (dt[0], pl))

View File

@@ -156,4 +156,6 @@ patch_list = [
"execute:webnotes.reload_doc('accounts','Print Format','Payment Receipt Voucher')",
"patches.january_2013.update_fraction_for_usd",
"patches.january_2013.enable_currencies",
"patches.january_2013.remove_unwanted_permission",
"patches.january_2013.remove_landed_cost_master",
]

View File

@@ -16,7 +16,7 @@ def project_perms():
def stock_perms():
webnotes.conn.sql("""delete from `tabDocPerm`
where parent in ('Landed Cost Master', 'Landed Cost Wizard',
where parent in ('Landed Cost Wizard',
'Sales and Purchase Return Tool') and role='All' and permlevel=0""")
def account_perms():