permission reloaded for bom replace tool
diff --git a/manufacturing/doctype/bom_replace_tool/bom_replace_tool.txt b/manufacturing/doctype/bom_replace_tool/bom_replace_tool.txt
index bb2c56b..a803608 100644
--- a/manufacturing/doctype/bom_replace_tool/bom_replace_tool.txt
+++ b/manufacturing/doctype/bom_replace_tool/bom_replace_tool.txt
@@ -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"
},
{
diff --git a/patches/february_2013/__init__.py b/patches/february_2013/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/patches/february_2013/__init__.py
diff --git a/patches/february_2013/reload_bom_replace_tool_permission.py b/patches/february_2013/reload_bom_replace_tool_permission.py
new file mode 100644
index 0000000..fca032e
--- /dev/null
+++ b/patches/february_2013/reload_bom_replace_tool_permission.py
@@ -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")
\ No newline at end of file
diff --git a/patches/february_2013/remove_gl_mapper.py b/patches/february_2013/remove_gl_mapper.py
new file mode 100644
index 0000000..5a7e418
--- /dev/null
+++ b/patches/february_2013/remove_gl_mapper.py
@@ -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])
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 4d3146c..95fe806 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -160,4 +160,6 @@
"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",
]
\ No newline at end of file