Merge branch 'master' of github.com:webnotes/erpnext
diff --git a/accounts/doctype/pos_setting/pos_setting.js b/accounts/doctype/pos_setting/pos_setting.js
index 62549bb..653b631 100755
--- a/accounts/doctype/pos_setting/pos_setting.js
+++ b/accounts/doctype/pos_setting/pos_setting.js
@@ -18,8 +18,10 @@
 	$c_obj(make_doclist(cdt,cdn),'get_series','',function(r,rt){
 		if(r.message) set_field_options('naming_series', r.message);
 	});
- 
 	
+	cur_frm.set_query("price_list_name", function() {
+		return { filters: { buying_or_selling: "Selling" } };
+	});
 }
 
 //cash bank account
diff --git a/accounts/doctype/pos_setting/pos_setting.txt b/accounts/doctype/pos_setting/pos_setting.txt
index 4454973..d827490 100755
--- a/accounts/doctype/pos_setting/pos_setting.txt
+++ b/accounts/doctype/pos_setting/pos_setting.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 12:15:51", 
   "docstatus": 0, 
-  "modified": "2013-07-05 14:50:33", 
+  "modified": "2013-07-26 11:16:53", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -94,11 +94,11 @@
  {
   "doctype": "DocField", 
   "fieldname": "price_list_name", 
-  "fieldtype": "Select", 
+  "fieldtype": "Link", 
   "label": "Price List", 
   "oldfieldname": "price_list_name", 
   "oldfieldtype": "Select", 
-  "options": "link:Price List", 
+  "options": "Price List", 
   "read_only": 0, 
   "reqd": 1
  }, 
diff --git a/accounts/doctype/sales_invoice/sales_invoice.txt b/accounts/doctype/sales_invoice/sales_invoice.txt
index 625d2c9..acc9ebe 100644
--- a/accounts/doctype/sales_invoice/sales_invoice.txt
+++ b/accounts/doctype/sales_invoice/sales_invoice.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 19:29:05", 
   "docstatus": 0, 
-  "modified": "2013-07-25 16:08:10", 
+  "modified": "2013-07-26 11:16:58", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -247,11 +247,11 @@
  {
   "doctype": "DocField", 
   "fieldname": "price_list_name", 
-  "fieldtype": "Select", 
+  "fieldtype": "Link", 
   "label": "Price List", 
   "oldfieldname": "price_list_name", 
   "oldfieldtype": "Select", 
-  "options": "link:Price List", 
+  "options": "Price List", 
   "print_hide": 1, 
   "read_only": 0, 
   "reqd": 1
diff --git a/buying/doctype/purchase_order/test_purchase_order.py b/buying/doctype/purchase_order/test_purchase_order.py
index 2c354b5..75eac94 100644
--- a/buying/doctype/purchase_order/test_purchase_order.py
+++ b/buying/doctype/purchase_order/test_purchase_order.py
@@ -70,6 +70,12 @@
 		po.doc.conversion_rate = 0.0167
 		self.assertRaises(WrongWarehouseCompany, po.insert)
 
+	def test_uom_integer_validation(self):
+		from utilities.transaction_base import UOMMustBeIntegerError
+		po = webnotes.bean(copy=test_records[0])
+		po.doclist[1].qty = 3.4
+		self.assertRaises(UOMMustBeIntegerError, po.insert)
+
 
 test_dependencies = ["BOM"]
 
@@ -101,7 +107,7 @@
 			"import_rate": 500.0,
 			"amount": 5000.0,
 			"warehouse": "_Test Warehouse - _TC", 
-			"stock_uom": "Nos", 
+			"stock_uom": "_Test UOM", 
 			"uom": "_Test UOM",
 			"schedule_date": "2013-03-01"
 		}
diff --git a/config.json b/config.json
index 29d24fe..c9d1aa7 100644
--- a/config.json
+++ b/config.json
@@ -87,9 +87,6 @@
 				"no_cache": true,
 				"template": "app/website/templates/pages/account"
 			},
-			"attributions": {
-				"template": "app/website/templates/pages/attributions"
-			},
 			"blog": {
 				"template": "app/website/templates/pages/blog",
 				"args_method": "website.helpers.blog.get_blog_template_args"
diff --git a/home/page/attributions/README.md b/home/page/attributions/README.md
deleted file mode 100644
index a5237bb..0000000
--- a/home/page/attributions/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Attributions for software libraries / images used in ERPNext.
\ No newline at end of file
diff --git a/home/page/attributions/__init__.py b/home/page/attributions/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/home/page/attributions/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/home/page/attributions/attributions.css b/home/page/attributions/attributions.css
deleted file mode 100644
index 1de05ee..0000000
--- a/home/page/attributions/attributions.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.layout-attributions td:first-child {
-	width: 30%;
-}
\ No newline at end of file
diff --git a/home/page/attributions/attributions.html b/home/page/attributions/attributions.html
deleted file mode 100644
index 00f6342..0000000
--- a/home/page/attributions/attributions.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<div class="appframe col col-lg-12 layout-attributions">
-	<div class="layout-appframe"></div>
-	<div class="layout-main">
-	<h3>ERPNext is made using these Awesome Open Source Projects <i class="icon-heart" style="color: red"></i></h3>
-	<hr>
-	<table class="table table-bordered table-striped">
-		<tbody>
-		<tr>
-			<td><a href="https://github.com/webnotes/erpnext">ERPNext</a></td>
-			<td>Web based, Open Source ERP. <br>
-				Get top class hosting and support at <a href="https://erpnext.com">ERPNext.com</a></td>
-		</tr>
-		<tr>
-			<td><a href="https://github.com/webnotes/wnframework">wnframework</a></td>
-			<td>The full stack Python + Javascript web application framework on which ERPNext is built.</td>
-		</tr>
-		<tr>
-			<td><a href="http://en.wikipedia.org/wiki/Linux">Linux Operating System</a></td>
-			<td>The operating system that brought a revolution in Open Source software.</td>
-		</tr>
-		<tr>
-			<td><a href="http://www.mysql.com/">MySQL Database</a></td>
-			<td>The world's most popular Open Source Database.</td>
-		</tr>
-		<tr>
-			<td><a href="http://httpd.apache.org">Apache HTTPD web server</a></td>
-			<td>The Number One HTTP Server On The Internet.</td>
-		</tr>
-		<tr>
-			<td><a href="http://memcached.org/">Memcached</a></td>
-			<td>Free & open source, high-performance, distributed memory object caching system.</td>
-		</tr>
-		<tr>
-			<td><a href="http://python.org/">Python Programming Language</a></td>
-			<td>The "batteries included" language that lets you write elegant code, quickly.<br><br>Python Libraries:
-			<ul>
-				<li>MySQLdb
-				<li>pytz
-				<li>jinja2
-				<li>markdown2
-				<li>dateutil
-				<li>termcolor
-				<li>python-memcached
-				<li>requests
-				<li>chardet
-				<li>pygeoip
-				<li>dropbox
-				<li>google-api-python-client
-			</ul>
-			</td>
-		</tr>
-		<tr>
-			<td><a href="http://git-scm.com/">Git - Source Code Management</a></td>
-			<td>Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.<br><br>
-				Kindly hosted on the web by <a href="https://github.com">GitHub</a>: The service that makes it easier for individuals and teams to write better code, faster. </td>
-		</tr>
-		<tr>
-			<td><a href="http://jquery.com/">JQuery Javascript Libary</a></td>
-			<td>The write less, do more Javascript Library.</td>
-		</tr>
-		<tr>
-			<td><a href="http://jqueryui.com/">JQuery UI - User Interface Library</a></td>
-			<td>A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.</td>
-		</tr>
-		<tr>
-			<td><a href="http://twitter.github.com/bootstrap/index.html">Bootstrap CSS Framework</a></td>
-			<td>Sleek, intuitive, and powerful front-end framework for faster and easier web development.</td>
-		</tr>
-		<tr>
-			<td><a href="http://fortawesome.github.com/Font-Awesome/">Font Awesome - Icons</a></td>
-			<td>The iconic font designed for use with Twitter Bootstrap.</td>
-		</tr>
-		<tr>
-			<td><a href="http://www.tinymce.com/">TinyMCE Rich Text Editor</a></td>
-			<td>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB.</td>
-		</tr>
-		<tr>
-			<td><a href="https://github.com/mleibman/SlickGrid">SlickGrid</a></td>
-			<td>A lightning fast JavaScript grid/spreadsheet.</td>
-		</tr>		
-		<tr>
-			<td><a href="http://arshaw.com/fullcalendar/">FullCalendar</a></td>
-			<td>FullCalendar is a jQuery plugin that provides a full-sized, drag and drop calendar.</td>
-		</tr>
-		<tr>
-			<td><a href="http://www.flotcharts.org/">Flot Charting Library</a></td>
-			<td>Attractive JavaScript plotting for jQuery.</td>
-		</tr>		
-		<tr>
-			<td><a href="http://ace.ajax.org/">Ace Code Editor</a></td>
-			<td>High Performance Code Editor for the web.</td>
-		</tr>
-		<tr>
-			<td><a href="http://taitems.github.com/jQuery.Gantt/">JQuery.Gantt - Gantt Charts</a></td>
-			<td>Draw Gantt charts with the famous jQuery ease of development.</td>
-		</tr>
-		<tr>
-			<td><a href="http://aehlke.github.io/tag-it/">JQuery Tag-it</a></td>
-			<td>Simple and configurable tag editing widget with autocomplete support.</td>
-		</tr>
-		<tr>
-			<td><a href="http://jscolor.com/">JSColor - Color Picker</a></td>
-			<td>HTML/Javascript Color Picker.</td>
-		</tr>
-		<tr>
-			<td><a href="http://qunitjs.com/">QUnit</a></td>
-			<td>A JavaScript Unit Testing framework.</td>
-		</tr>
-		<tr>
-			<td><a href="https://github.com/dcneiner/Downloadify">Downloadify - Flash Download Widget</a></td>
-			<td>A tiny javascript + Flash library that enables the creation and download of text files without server interaction.</td>
-		</tr>
-		<tr>
-			<td><a href="http://dev.maxmind.com/geoip/geolite">GeoLite data by MaxMind</a></td>
-			<td>GeoLite data created by MaxMind, available from
-			  <a href="https://www.maxmind.com">https://www.maxmind.com</a></td>
-		</tr>
-		</tbody>
-	</table>
-	
-	<hr>
-	<h3>ERPNext License: GNU/General Public License</h3>
-	<div class="well">
-	<p><b>ERPNext - Open Source, web based ERP</b></p>
-	<p>Copyright &copy; 2012, Web Notes Technologies Pvt Ltd, India</p>
-
-	<p>This program is free software: you can redistribute it and/or modify
-	    it under the terms of the <b>GNU General Public License</b> as published by
-	    the Free Software Foundation, either version 3 of the License, or
-	    (at your option) any later version.</p>
-
-	    <p>This program is distributed in the hope that it will be useful,
-	    but WITHOUT ANY WARRANTY; without even the implied warranty of
-	    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-	    GNU General Public License for more details.</p>
-
- 		<p>For complete license see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a></p>
-	</div>
-	<p class="alert">Note: A link to this page must be easily accessible and all other ERPNext branding must remain as it is.</p>
-	<hr>
-	<p>For more information please write to us at support@erpnext.com</p>
-	</div>
-</div>
\ No newline at end of file
diff --git a/home/page/attributions/attributions.js b/home/page/attributions/attributions.js
deleted file mode 100644
index 29eb72f..0000000
--- a/home/page/attributions/attributions.js
+++ /dev/null
@@ -1,4 +0,0 @@
-wn.pages['attributions'].onload = function(wrapper) { 
-	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find(".layout-appframe"), 
-		"Attributions");
-}
\ No newline at end of file
diff --git a/home/page/attributions/attributions.py b/home/page/attributions/attributions.py
deleted file mode 100644
index fbba099..0000000
--- a/home/page/attributions/attributions.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import unicode_literals
-import webnotes
\ No newline at end of file
diff --git a/home/page/attributions/attributions.txt b/home/page/attributions/attributions.txt
deleted file mode 100644
index 547d9bc..0000000
--- a/home/page/attributions/attributions.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-[
- {
-  "creation": "2012-03-01 12:30:42", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:41:47", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-trophy", 
-  "module": "Home", 
-  "name": "__common__", 
-  "page_name": "attributions", 
-  "standard": "Yes", 
-  "title": "Attributions"
- }, 
- {
-  "doctype": "Page", 
-  "name": "attributions"
- }
-]
\ No newline at end of file
diff --git a/patches/july_2013/p08_custom_print_format_net_total_export.py b/patches/july_2013/p08_custom_print_format_net_total_export.py
index a6a8335..c848ac9 100644
--- a/patches/july_2013/p08_custom_print_format_net_total_export.py
+++ b/patches/july_2013/p08_custom_print_format_net_total_export.py
@@ -3,13 +3,14 @@
 import re
 
 def execute():
-	for name, html in webnotes.conn.sql("""select name, html from `tabPrint Format` where standard='No'"""):
-		changed = False
-		for match in re.findall("(doc.net_total.*doc.conversion_rate)", html):
-			if match.replace(" ", "") == "doc.net_total/doc.conversion_rate":
-				html = html.replace(match, "doc.net_total_export")
-				changed = True
+	for name, html in webnotes.conn.sql("""select name, html from `tabPrint Format` where standard='No'
+		and ifnull(html, '')!=''"""):
+			changed = False
+			for match in re.findall("(doc.net_total.*doc.conversion_rate)", html):
+				if match.replace(" ", "") == "doc.net_total/doc.conversion_rate":
+					html = html.replace(match, "doc.net_total_export")
+					changed = True
 		
-		if changed:
-			webnotes.conn.set_value("Print Format", name, "html", html)
+			if changed:
+				webnotes.conn.set_value("Print Format", name, "html", html)
 			
\ No newline at end of file
diff --git a/selling/doctype/quotation/quotation.txt b/selling/doctype/quotation/quotation.txt
index 7f16466..7949c03 100644
--- a/selling/doctype/quotation/quotation.txt
+++ b/selling/doctype/quotation/quotation.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 19:29:08", 
   "docstatus": 0, 
-  "modified": "2013-07-23 15:27:53", 
+  "modified": "2013-07-26 11:16:53", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -281,12 +281,12 @@
   "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", 
   "doctype": "DocField", 
   "fieldname": "price_list_name", 
-  "fieldtype": "Select", 
+  "fieldtype": "Link", 
   "in_filter": 1, 
   "label": "Price List", 
   "oldfieldname": "price_list_name", 
   "oldfieldtype": "Select", 
-  "options": "link:Price List", 
+  "options": "Price List", 
   "print_hide": 1, 
   "read_only": 0, 
   "reqd": 1, 
diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js
index 246d4a1..dbd0a1a 100644
--- a/selling/doctype/sales_common/sales_common.js
+++ b/selling/doctype/sales_common/sales_common.js
@@ -70,6 +70,22 @@
 		this.frm.fields_dict.lead && this.frm.set_query("lead", function(doc,cdt,cdn) {
 			return{	query:"controllers.queries.lead_query" } });
 			
+		if(this.frm.fields_dict.price_list_name) {
+			this.frm.set_query("price_list_name", function() {
+				return { filters: { buying_or_selling: "Selling" } };
+			});
+		
+			this.frm.set_query("price_list_currency", function() {
+				return {
+					query: "controllers.queries.get_price_list_currency",
+					filters: {
+						price_list_name: me.frm.doc.price_list_name,
+						buying_or_selling: "Selling"
+					}					
+				};
+			});
+		}
+			
 		if(!this.fname) {
 			return;
 		}
diff --git a/selling/doctype/sales_order/sales_order.txt b/selling/doctype/sales_order/sales_order.txt
index 3e6cbe4..8c27b60 100644
--- a/selling/doctype/sales_order/sales_order.txt
+++ b/selling/doctype/sales_order/sales_order.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-06-18 12:39:59", 
   "docstatus": 0, 
-  "modified": "2013-07-23 15:27:39", 
+  "modified": "2013-07-26 11:16:55", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -294,11 +294,11 @@
   "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", 
   "doctype": "DocField", 
   "fieldname": "price_list_name", 
-  "fieldtype": "Select", 
+  "fieldtype": "Link", 
   "label": "Price List", 
   "oldfieldname": "price_list_name", 
   "oldfieldtype": "Select", 
-  "options": "link:Price List", 
+  "options": "Price List", 
   "print_hide": 1, 
   "reqd": 1, 
   "width": "100px"
diff --git a/setup/doctype/price_list/price_list.txt b/setup/doctype/price_list/price_list.txt
index 1af2e1b..febf471 100644
--- a/setup/doctype/price_list/price_list.txt
+++ b/setup/doctype/price_list/price_list.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-01-25 11:35:09", 
   "docstatus": 0, 
-  "modified": "2013-07-23 12:03:25", 
+  "modified": "2013-07-26 11:19:06", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -55,6 +55,7 @@
   "doctype": "DocField", 
   "fieldname": "currency", 
   "fieldtype": "Link", 
+  "in_list_view": 1, 
   "label": "Currency", 
   "options": "Currency", 
   "reqd": 1
@@ -64,6 +65,7 @@
   "doctype": "DocField", 
   "fieldname": "buying_or_selling", 
   "fieldtype": "Select", 
+  "in_list_view": 1, 
   "label": "Valid for Buying or Selling?", 
   "options": "Buying\nSelling", 
   "reqd": 1
diff --git a/setup/doctype/uom/test_uom.py b/setup/doctype/uom/test_uom.py
index 51c2bdd..7dbb28c 100644
--- a/setup/doctype/uom/test_uom.py
+++ b/setup/doctype/uom/test_uom.py
@@ -1,6 +1,11 @@
 test_records = [
 	[{
 		"doctype": "UOM",
-		"uom_name": "_Test UOM"
+		"uom_name": "_Test UOM",
+		"must_be_whole_number": 1
+	}],
+	[{
+		"doctype": "UOM",
+		"uom_name": "_Test UOM 1"
 	}]
 ]
\ No newline at end of file
diff --git a/stock/doctype/delivery_note/delivery_note.txt b/stock/doctype/delivery_note/delivery_note.txt
index aa9530f..3008b79 100644
--- a/stock/doctype/delivery_note/delivery_note.txt
+++ b/stock/doctype/delivery_note/delivery_note.txt
@@ -2,7 +2,7 @@
  {
   "creation": "2013-05-24 19:29:09", 
   "docstatus": 0, 
-  "modified": "2013-07-23 15:28:18", 
+  "modified": "2013-07-26 11:16:57", 
   "modified_by": "Administrator", 
   "owner": "Administrator"
  }, 
@@ -286,11 +286,11 @@
   "description": "Select the price list as entered in \"Price List\" master. This will pull the reference rates of items against this price list as specified in \"Item\" master.", 
   "doctype": "DocField", 
   "fieldname": "price_list_name", 
-  "fieldtype": "Select", 
+  "fieldtype": "Link", 
   "label": "Price List", 
   "oldfieldname": "price_list_name", 
   "oldfieldtype": "Select", 
-  "options": "link:Price List", 
+  "options": "Price List", 
   "print_hide": 1, 
   "read_only": 0, 
   "reqd": 1
diff --git a/utilities/page/__init__.py b/utilities/page/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/page/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/page/markdown_reference/README.md b/utilities/page/markdown_reference/README.md
deleted file mode 100644
index 80f16cb..0000000
--- a/utilities/page/markdown_reference/README.md
+++ /dev/null
@@ -1 +0,0 @@
-Markdown reference.
\ No newline at end of file
diff --git a/utilities/page/markdown_reference/__init__.py b/utilities/page/markdown_reference/__init__.py
deleted file mode 100644
index baffc48..0000000
--- a/utilities/page/markdown_reference/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/page/markdown_reference/markdown_reference.css b/utilities/page/markdown_reference/markdown_reference.css
deleted file mode 100644
index e69de29..0000000
--- a/utilities/page/markdown_reference/markdown_reference.css
+++ /dev/null
diff --git a/utilities/page/markdown_reference/markdown_reference.html b/utilities/page/markdown_reference/markdown_reference.html
deleted file mode 100644
index 767ac36..0000000
--- a/utilities/page/markdown_reference/markdown_reference.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<div class="appframe col col-lg-12">
-	<div class="layout-appframe">
-		<div class="appframe-titlebar">
-			<span class="appframe-title">Markdown Reference</span>
-			<span class="close" onclick="window.history.back()">&times;</span>
-		</div>
-	</div>
-	<div class="layout-main">
-		<div style="width: 60%" class="markdown">
-<h3>Phrase Emphasis</h3>
-<pre><code>*italic*   **bold**
-_italic_   __bold__
-</code></pre>
-
-<h3>Links</h3>
-
-<p>Inline:</p>
-
-<pre><code>An [example](http://url.com/ "Title")
-</code></pre>
-
-<p>Reference-style labels (titles are optional):</p>
-
-<pre><code>An [example][id]. Then, anywhere
-else in the doc, define the link:
-
-   [id]: http://example.com/  "Title"
-</code></pre>
-
-<h3>Images</h3>
-
-<p>Inline (titles are optional):</p>
-
-<pre><code>![alt text](/path/img.jpg "Title")
-</code></pre>
-
-<p>Reference-style:</p>
-
-<pre><code>![alt text][id]
-
-    [id]: /url/to/img.jpg "Title"
-</code></pre>
-
-<h3>Headers</h3>
-
-<p>Setext-style:</p>
-
-<pre><code>Header 1
-========
-
-Header 2
---------
-
-</code></pre>
-
-<p>atx-style (closing #'s are optional):</p>
-
-<pre><code># Header 1 #
-
-
-</code></pre>
-
-<h3>Lists</h3>
-
-<p>Ordered, without paragraphs:</p>
-
-<pre><code>1.  Foo
-2.  Bar
-</code></pre>
-
-<p>Unordered, with paragraphs:</p>
-
-<pre><code>*   A list item.
-
-    With multiple paragraphs.
-
-*   Bar
-</code></pre>
-
-<p>You can nest them:</p>
-
-<pre><code>*   Abacus
-    * ass
-*   Bastard
-    1.  bitch
-    2.  bupkis
-        * BELITTLER
-    3. burper
-*   Cunning
-</code></pre>
-
-<h3>Blockquotes</h3>
-
-<pre><code>&gt; Email-style angle brackets
-
-&gt; are used for blockquotes.
-
-&gt; &gt; And, they can be nested.
-
-&gt; &gt;
-&gt; * You can quote a list.
-&gt; * Etc.
-</code></pre>
-
-<h3>Code Spans</h3>
-
-<pre><code>`&lt;code&gt;` spans are delimited
-by backticks.
-
-You can include literal backticks
-like `` `this` ``.
-</code></pre>
-
-<h3>Preformatted Code Blocks</h3>
-
-<p>Indent every line of a code block by at least 4 spaces or 1 tab, and use a colon at the end of the preceding paragraph.</p>
-
-<pre><code>This is a normal paragraph:
-
-    This is a preformatted
-    code block.
-
-Preceded by a space, the colon
-disappears. :
-
-    This is a preformatted
-    code block.
-</code></pre>
-
-<h3>Horizontal Rules</h3>
-
-<p>Three or more dashes or asterisks:</p>
-
-<pre><code>---
-
-* * *
-
-- - - -
-</code></pre>
-
-<h3>Manual Line Breaks</h3>
-
-<p>End a line with two or more spaces:</p>
-
-<pre><code>Roses are red,
-Violets are blue.
-</code></pre>
-		</div>
-	</div>
-</div>
\ No newline at end of file
diff --git a/utilities/page/markdown_reference/markdown_reference.js b/utilities/page/markdown_reference/markdown_reference.js
deleted file mode 100644
index 8e8fbac..0000000
--- a/utilities/page/markdown_reference/markdown_reference.js
+++ /dev/null
@@ -1 +0,0 @@
-wn.pages['markdown-reference'].onload = function(wrapper) { }
\ No newline at end of file
diff --git a/utilities/page/markdown_reference/markdown_reference.py b/utilities/page/markdown_reference/markdown_reference.py
deleted file mode 100644
index fbba099..0000000
--- a/utilities/page/markdown_reference/markdown_reference.py
+++ /dev/null
@@ -1,2 +0,0 @@
-from __future__ import unicode_literals
-import webnotes
\ No newline at end of file
diff --git a/utilities/page/markdown_reference/markdown_reference.txt b/utilities/page/markdown_reference/markdown_reference.txt
deleted file mode 100644
index 2906644..0000000
--- a/utilities/page/markdown_reference/markdown_reference.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-[
- {
-  "creation": "2012-08-07 12:35:30", 
-  "docstatus": 0, 
-  "modified": "2013-07-11 14:43:28", 
-  "modified_by": "Administrator", 
-  "owner": "Administrator"
- }, 
- {
-  "doctype": "Page", 
-  "icon": "icon-code", 
-  "module": "Utilities", 
-  "name": "__common__", 
-  "page_name": "Markdown Reference", 
-  "standard": "Yes", 
-  "title": "Markdown Reference"
- }, 
- {
-  "doctype": "Page", 
-  "name": "markdown-reference"
- }
-]
\ No newline at end of file
diff --git a/utilities/transaction_base.py b/utilities/transaction_base.py
index 4acfdf4..fc746c4 100644
--- a/utilities/transaction_base.py
+++ b/utilities/transaction_base.py
@@ -95,7 +95,7 @@
 			self.doc.price_list
 			
 		for fieldname, val in customer_defaults.items():
-			if not self.doc.fields.get(fieldname) and self.meta.get_field(fieldname):
+			if self.meta.get_field(fieldname):
 				self.doc.fields[fieldname] = val
 			
 		if self.meta.get_field("sales_team"):
@@ -135,7 +135,7 @@
 		
 	def set_supplier_defaults(self):
 		for fieldname, val in self.get_supplier_defaults().items():
-			if not self.doc.fields.get(fieldname) and self.meta.get_field(fieldname):
+			if self.meta.get_field(fieldname):
 				self.doc.fields[fieldname] = val
 				
 	def get_lead_defaults(self):
@@ -502,6 +502,8 @@
 	webnotes.delete_doc("Event", webnotes.conn.sql_list("""select name from `tabEvent` 
 		where ref_type=%s and ref_name=%s""", (ref_type, ref_name)), for_reload=True)
 
+class UOMMustBeIntegerError(webnotes.ValidationError): pass
+
 def validate_uom_is_integer(doclist, uom_field, qty_fields):
 	if isinstance(qty_fields, basestring):
 		qty_fields = [qty_fields]
@@ -520,4 +522,4 @@
 						webnotes.msgprint(_("For UOM") + " '" + d.fields[uom_field] \
 							+ "': " + _("Quantity cannot be a fraction.") \
 							+ " " + _("In Row") + ": " + str(d.idx),
-							raise_exception=True)
+							raise_exception=UOMMustBeIntegerError)
diff --git a/website/templates/html/footer.html b/website/templates/html/footer.html
index 3161987..0e6cca7 100644
--- a/website/templates/html/footer.html
+++ b/website/templates/html/footer.html
@@ -23,7 +23,7 @@
 		</div>
 		{% endif %}
 		<p style="float: right; clear: right;">
-			<a style="font-size: 90%; color: #888;" href="attributions">ERPNext Powered</a>
+			<a style="font-size: 90%; color: #888;" href="http://erpnext.org">ERPNext Powered</a>
 		</p>
 		<div class="web-footer-menu">
 			<ul>
diff --git a/website/templates/pages/attributions.html b/website/templates/pages/attributions.html
deleted file mode 100644
index 0f534a4..0000000
--- a/website/templates/pages/attributions.html
+++ /dev/null
@@ -1,140 +0,0 @@
-{% extends "app/website/templates/html/outer.html" %}
-
-{% block header %}
-<style>
-.layout-attributions td:first-child {
-	width: 30%;
-}
-</style>
-{% endblock %}
-
-{% set title="ERPNext - Web Based, Open Source ERP" %}
-
-{% block content %}
-<div class="layout-attributions col col-lg-12">
-	<h3>This website is made using these awesome Open Source projects <i class="icon-heart" style="color: red"></i></h3>
-	<hr>
-	<table class="table table-bordered table-striped">
-		<tbody>
-		<tr>
-			<td><a href="https://github.com/webnotes/erpnext">ERPNext</a></td>
-			<td>Web based, Open Source ERP. <br>
-				Get top class hosting and support at <a href="https://erpnext.com">ERPNext.com</a></td>
-		</tr>
-		<tr>
-			<td><a href="https://github.com/webnotes/wnframework">wnframework</a></td>
-			<td>The full stack Python + Javascript web application framework on which ERPNext is built.</td>
-		</tr>
-		<tr>
-			<td><a href="http://en.wikipedia.org/wiki/Linux">Linux Operating System</a></td>
-			<td>The operating system that brought a revolution in Open Source software.</td>
-		</tr>
-		<tr>
-			<td><a href="http://www.mysql.com/">MySQL Database</a></td>
-			<td>The world's most popular Open Source Database.</td>
-		</tr>
-		<tr>
-			<td><a href="http://httpd.apache.org">Apache HTTPD web server</a></td>
-			<td>The Number One HTTP Server On The Internet.</td>
-		</tr>
-		<tr>
-			<td><a href="http://memcached.org/">Memcached</a></td>
-			<td>Free & open source, high-performance, distributed memory object caching system.</td>
-		</tr>
-		<tr>
-			<td><a href="http://python.org/">Python Programming Language</a></td>
-			<td>The "batteries included" language that lets you write elegant code, quickly.<br><br>Python Libraries:
-			<ul>
-				<li>MySQLdb
-				<li>pytz
-				<li>jinja2
-				<li>markdown2
-				<li>dateutil
-				<li>termcolor
-				<li>python-memcached
-			</ul>
-			</td>
-		</tr>
-		<tr>
-			<td><a href="http://git-scm.com/">Git - Source Code Management</a></td>
-			<td>Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.<br><br>
-				Kindly hosted on the web by <a href="https://github.com">GitHub</a>: The service that makes it easier for individuals and teams to write better code, faster. </td>
-		</tr>
-		<tr>
-			<td><a href="http://jquery.com/">JQuery Javascript Libary</a></td>
-			<td>The write less, do more Javascript Library.</td>
-		</tr>
-		<tr>
-			<td><a href="http://jqueryui.com/">JQuery UI - User Interface Library</a></td>
-			<td>A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.</td>
-		</tr>
-		<tr>
-			<td><a href="http://twitter.github.com/bootstrap/index.html">Bootstrap CSS Framework</a></td>
-			<td>Sleek, intuitive, and powerful front-end framework for faster and easier web development.</td>
-		</tr>
-		<tr>
-			<td><a href="http://fortawesome.github.com/Font-Awesome/">Font Awesome - Icons</a></td>
-			<td>The iconic font designed for use with Twitter Bootstrap.</td>
-		</tr>
-		<tr>
-			<td><a href="http://www.tinymce.com/">TinyMCE Rich Text Editor</a></td>
-			<td>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB.</td>
-		</tr>
-		<tr>
-			<td><a href="https://github.com/mleibman/SlickGrid">SlickGrid</a></td>
-			<td>A lightning fast JavaScript grid/spreadsheet.</td>
-		</tr>		
-		<tr>
-			<td><a href="http://arshaw.com/fullcalendar/">FullCalendar</a></td>
-			<td>FullCalendar is a jQuery plugin that provides a full-sized, drag and drop calendar.</td>
-		</tr>
-		<tr>
-			<td><a href="http://www.flotcharts.org/">Flot Charting Library</a></td>
-			<td>Attractive JavaScript plotting for jQuery.</td>
-		</tr>		
-		<tr>
-			<td><a href="http://ace.ajax.org/">Ace Code Editor</a></td>
-			<td>High Performance Code Editor for the web.</td>
-		</tr>
-		<tr>
-			<td><a href="http://taitems.github.com/jQuery.Gantt/">JQuery.Gantt - Gantt Charts</a></td>
-			<td>Draw Gantt charts with the famous jQuery ease of development.</td>
-		</tr>
-		<tr>
-			<td><a href="http://jscolor.com/">JSColor - Color Picker</a></td>
-			<td>HTML/Javascript Color Picker.</td>
-		</tr>
-		<tr>
-			<td><a href="http://qunitjs.com/">QUnit</a></td>
-			<td>A JavaScript Unit Testing framework.</td>
-		</tr>
-		<tr>
-			<td><a href="https://github.com/dcneiner/Downloadify">Downloadify - Flash Download Widget</a></td>
-			<td>A tiny javascript + Flash library that enables the creation and download of text files without server interaction.</td>
-		</tr>				
-		</tbody>
-	</table>
-	
-	<hr>
-	<h3>ERPNext License: GNU/General Public License</h3>
-	<div class="well">
-	<p><b>ERPNext - Open Source, web based ERP</b></p>
-	<p>Copyright &copy; 2012, Web Notes Technologies Pvt Ltd, India</p>
-
-	<p>This program is free software: you can redistribute it and/or modify
-	    it under the terms of the <b>GNU General Public License</b> as published by
-	    the Free Software Foundation, either version 3 of the License, or
-	    (at your option) any later version.</p>
-
-	    <p>This program is distributed in the hope that it will be useful,
-	    but WITHOUT ANY WARRANTY; without even the implied warranty of
-	    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-	    GNU General Public License for more details.</p>
-
- 		<p>For complete license see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a></p>
-	</div>
-	<p class="alert">Note: A link to this page must be easily accessible and all other ERPNext branding must remain as it is.</p>
-	<hr>
-	<p>For more information please write to us at support@erpnext.com</p>
-</div>
-{% endblock %}
\ No newline at end of file