Merge branch 'master' of github.com:webnotes/erpnext into navupdate
diff --git a/erpnext/patches/jan_mar_2012/website/all.py b/erpnext/patches/jan_mar_2012/website/all.py
index c68e653..1443f36 100644
--- a/erpnext/patches/jan_mar_2012/website/all.py
+++ b/erpnext/patches/jan_mar_2012/website/all.py
@@ -5,6 +5,7 @@
 import patches.jan_mar_2012.website.domain_list
 import patches.jan_mar_2012.website.file_data_rename
 import patches.jan_mar_2012.website.analytics
+import patches.jan_mar_2012.website.allow_product_delete
 
 
 def execute():
@@ -15,3 +16,4 @@
 	patches.jan_mar_2012.website.domain_list.execute()
 	patches.jan_mar_2012.website.file_data_rename.execute()
 	patches.jan_mar_2012.website.analytics.execute()
+	patches.jan_mar_2012.website.allow_product_delete.execute()
diff --git a/erpnext/patches/jan_mar_2012/website/allow_product_delete.py b/erpnext/patches/jan_mar_2012/website/allow_product_delete.py
new file mode 100644
index 0000000..fbef48f
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/website/allow_product_delete.py
@@ -0,0 +1,8 @@
+def execute():
+	"""
+		Allow deletion of products
+	"""
+	import webnotes
+	webnotes.conn.sql("""UPDATE `tabDocPerm` SET cancel=1
+		WHERE parent='Product' AND role='Website Manager'
+		AND permlevel=0""")
diff --git a/erpnext/production/doctype/bill_of_materials/bill_of_materials.py b/erpnext/production/doctype/bill_of_materials/bill_of_materials.py
index 1177425..decb9fe 100644
--- a/erpnext/production/doctype/bill_of_materials/bill_of_materials.py
+++ b/erpnext/production/doctype/bill_of_materials/bill_of_materials.py
@@ -268,7 +268,7 @@
 
 	def check_if_item_repeated(self, item, op, check_list):
 		if [cstr(item), cstr(op)] in check_list:
-			msgprint("Item %s has been entered twice against same operation" % d.item_code, raise_exception = 1)
+			msgprint("Item %s has been entered twice against same operation" % item, raise_exception = 1)
 		else:
 			check_list.append([cstr(item), cstr(op)])
 
diff --git a/erpnext/website/doctype/product/product.txt b/erpnext/website/doctype/product/product.txt
index 6258691..0405e4c 100644
--- a/erpnext/website/doctype/product/product.txt
+++ b/erpnext/website/doctype/product/product.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2012-01-30 16:21:29',
+		'creation': '2012-02-17 15:53:22',
 		'docstatus': 0,
-		'modified': '2012-02-06 16:15:29',
+		'modified': '2012-02-22 18:32:46',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -18,12 +18,13 @@
 		'colour': u'White:FFF',
 		'description': u'A Product is shown on the website and is linked to an item.',
 		'doctype': 'DocType',
+		'document_type': u'Master',
 		'max_attachments': 5,
 		'module': u'Website',
 		'name': '__common__',
 		'section_style': u'Simple',
 		'show_in_menu': 0,
-		'version': 11
+		'version': 12
 	},
 
 	# These values are common for all DocField