mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
merge
This commit is contained in:
4
patches/january_2013/remove_landed_cost_master.py
Normal file
4
patches/january_2013/remove_landed_cost_master.py
Normal file
@@ -0,0 +1,4 @@
|
||||
def execute():
|
||||
import webnotes
|
||||
webnotes.delete_doc("DocType", "Landed Cost Master")
|
||||
webnotes.delete_doc("DocType", "Landed Cost Master Detail")
|
||||
13
patches/january_2013/remove_unwanted_permission.py
Normal file
13
patches/january_2013/remove_unwanted_permission.py
Normal 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))
|
||||
@@ -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",
|
||||
]
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user