permission reloaded for bom replace tool

This commit is contained in:
Nabin Hait 2013-02-01 12:14:45 +05:30
parent c063e653a9
commit ce4178b180
5 changed files with 44 additions and 32 deletions

View File

@ -1,75 +1,76 @@
[
{
"owner": "Administrator",
"docstatus": 0,
"creation": "2012-12-06 12:10:10",
"docstatus": 0,
"modified": "2013-02-01 12:07:25",
"modified_by": "Administrator",
"modified": "2012-12-06 12:32:22"
"owner": "Administrator"
},
{
"in_create": 1,
"allow_print": 1,
"module": "Production",
"document_type": "Other",
"description": "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate \"BOM Explosion Item\" table as per new BOM",
"read_only": 1,
"allow_copy": 1,
"allow_email": 1,
"hide_heading": 1,
"issingle": 1,
"name": "__common__",
"allow_print": 1,
"description": "Replace a particular BOM in all other BOMs where it is used. It will replace the old BOM link, update cost and regenerate \"BOM Explosion Item\" table as per new BOM",
"doctype": "DocType",
"document_type": "Other",
"hide_heading": 1,
"hide_toolbar": 1,
"allow_copy": 1
"in_create": 1,
"issingle": 1,
"module": "Manufacturing",
"name": "__common__",
"read_only": 1
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "BOM Replace Tool",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"read_only": 0
},
{
"parent": "BOM Replace Tool",
"read": 1,
"name": "__common__",
"create": 1,
"doctype": "DocPerm",
"write": 1,
"name": "__common__",
"parent": "BOM Replace Tool",
"parentfield": "permissions",
"parenttype": "DocType",
"role": "Administrator",
"permlevel": 0,
"parentfield": "permissions"
"read": 1,
"report": 0,
"role": "Manufacturing Manager",
"submit": 0,
"write": 1
},
{
"name": "BOM Replace Tool",
"doctype": "DocType"
"doctype": "DocType",
"name": "BOM Replace Tool"
},
{
"description": "The BOM which will be replaced",
"colour": "White:FFF",
"doctype": "DocField",
"label": "Current BOM",
"fieldname": "current_bom",
"fieldtype": "Link",
"reqd": 1,
"options": "BOM"
"label": "Current BOM",
"options": "BOM",
"reqd": 1
},
{
"description": "The new BOM after replacement",
"colour": "White:FFF",
"doctype": "DocField",
"label": "New BOM",
"fieldname": "new_bom",
"fieldtype": "Link",
"reqd": 1,
"options": "BOM"
"label": "New BOM",
"options": "BOM",
"reqd": 1
},
{
"doctype": "DocField",
"label": "Replace",
"fieldname": "replace",
"fieldtype": "Button",
"label": "Replace",
"options": "replace_bom"
},
{

View File

View File

@ -0,0 +1,4 @@
def execute():
import webnotes
webnotes.conn.sql("""delete from `tabDocPerm` where parent = 'BOM Replace Tool'""")
webnotes.reload_doc("manufacturing", "doctype", "bom_replace_tool")

View File

@ -0,0 +1,5 @@
def execute():
import webnotes
from webnotes.model.doc import delete_doc
for mapper in webnotes.conn.sql("""select name from `tabGL Mapper`"""):
delete_doc("GL Mapper", mapper[0])

View File

@ -160,4 +160,6 @@ patch_list = [
"patches.january_2013.rebuild_tree",
"execute:webnotes.reload_doc('core','doctype','docfield') #2013-01-28",
"patches.january_2013.tabsessions_to_myisam",
"patches.february_2013.remove_gl_mapper",
"patches.february_2013.reload_bom_replace_tool_permission",
]