diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 6d4bf3a..982df17 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -12,6 +12,7 @@
 
 from erpnext.accounts.party import get_party_account, get_due_date
 from erpnext.controllers.stock_controller import update_gl_entries_after
+from frappe.model.mapper import get_mapped_doc
 
 month_map = {'Monthly': 1, 'Quarterly': 3, 'Half-yearly': 6, 'Yearly': 12}
 
@@ -781,10 +782,9 @@
 
 @frappe.whitelist()
 def make_delivery_note(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
-
 	def set_missing_values(source, target):
-		target.run_method("onload_post_render")
+		target.run_method("set_missing_values")
+		target.run_method("calculate_taxes_and_totals")
 
 	def update_item(source_doc, target_doc, source_parent):
 		target_doc.base_amount = (flt(source_doc.qty) - flt(source_doc.delivered_qty)) * \
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index fbc6d5d..c50dc3b 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -15,10 +15,10 @@
 		this.setup_queries();
 		this._super();
 	},
-	
+
 	setup_queries: function() {
 		var me = this;
-		
+
 		if(this.frm.fields_dict.buying_price_list) {
 			this.frm.set_query("buying_price_list", function() {
 				return{
@@ -26,20 +26,20 @@
 				}
 			});
 		}
-		
-		$.each([["supplier", "supplier"], 
+
+		$.each([["supplier", "supplier"],
 			["contact_person", "supplier_filter"],
-			["supplier_address", "supplier_filter"]], 
+			["supplier_address", "supplier_filter"]],
 			function(i, opts) {
-				if(me.frm.fields_dict[opts[0]]) 
+				if(me.frm.fields_dict[opts[0]])
 					me.frm.set_query(opts[0], erpnext.queries[opts[1]]);
 			});
-		
+
 		if(this.frm.fields_dict.supplier) {
 			this.frm.set_query("supplier", function() {
 				return{	query: "erpnext.controllers.queries.supplier_query" }});
 		}
-		
+
 		this.frm.set_query("item_code", this.frm.cscript.fname, function() {
 			if(me.frm.doc.is_subcontracted == "Yes") {
 				 return{
@@ -50,61 +50,61 @@
 				return{
 					query: "erpnext.controllers.queries.item_query",
 					filters: { 'is_purchase_item': 'Yes' }
-				}				
+				}
 			}
 		});
 	},
-	
+
 	refresh: function(doc) {
-		this.frm.toggle_display("supplier_name", 
+		this.frm.toggle_display("supplier_name",
 			(this.supplier_name && this.frm.doc.supplier_name!==this.frm.doc.supplier));
 		this._super();
 	},
-	
+
 	supplier: function() {
 		erpnext.utils.get_party_details(this.frm);
 	},
-	
+
 	supplier_address: function() {
 		erpnext.utils.get_address_display(this.frm);
 	},
-	
-	contact_person: function() { 
+
+	contact_person: function() {
 		this.supplier_address();
 	},
-	
+
 	buying_price_list: function() {
 		this.get_price_list_currency("Buying");
 	},
-	
+
 	price_list_rate: function(doc, cdt, cdn) {
 		var item = frappe.get_doc(cdt, cdn);
 		frappe.model.round_floats_in(item, ["price_list_rate", "discount_percentage"]);
-		
+
 		item.rate = flt(item.price_list_rate * (1 - item.discount_percentage / 100.0),
 			precision("rate", item));
-		
+
 		this.calculate_taxes_and_totals();
 	},
-	
+
 	discount_percentage: function(doc, cdt, cdn) {
 		this.price_list_rate(doc, cdt, cdn);
 	},
-	
+
 	rate: function(doc, cdt, cdn) {
 		var item = frappe.get_doc(cdt, cdn);
 		frappe.model.round_floats_in(item, ["rate", "discount_percentage"]);
-		
+
 		if(item.price_list_rate) {
 			item.discount_percentage = flt((1 - item.rate / item.price_list_rate) * 100.0,
 				precision("discount_percentage", item));
 		} else {
 			item.discount_percentage = 0.0;
 		}
-		
+
 		this.calculate_taxes_and_totals();
 	},
-	
+
 	uom: function(doc, cdt, cdn) {
 		var me = this;
 		var item = frappe.get_doc(cdt, cdn);
@@ -124,12 +124,12 @@
 			});
 		}
 	},
-	
+
 	qty: function(doc, cdt, cdn) {
 		this._super(doc, cdt, cdn);
 		this.conversion_factor(doc, cdt, cdn);
 	},
-	
+
 	conversion_factor: function(doc, cdt, cdn) {
 		if(frappe.meta.get_docfield(cdt, "stock_qty", cdn)) {
 			var item = frappe.get_doc(cdt, cdn);
@@ -138,7 +138,7 @@
 			refresh_field("stock_qty", item.name, item.parentfield);
 		}
 	},
-	
+
 	warehouse: function(doc, cdt, cdn) {
 		var item = frappe.get_doc(cdt, cdn);
 		if(item.item_code && item.warehouse) {
@@ -152,12 +152,12 @@
 			});
 		}
 	},
-	
+
 	project_name: function(doc, cdt, cdn) {
 		var item = frappe.get_doc(cdt, cdn);
 		if(item.project_name) {
 			$.each(this.frm.doc[this.fname],
-				function(i, other_item) { 
+				function(i, other_item) {
 					if(!other_item.project_name) {
 						other_item.project_name = item.project_name;
 						refresh_field("project_name", other_item.name, other_item.parentfield);
@@ -165,35 +165,35 @@
 				});
 		}
 	},
-	
+
 	category: function(doc, cdt, cdn) {
 		// should be the category field of tax table
 		if(cdt != doc.doctype) {
 			this.calculate_taxes_and_totals();
 		}
 	},
-	
+
 	calculate_taxes_and_totals: function() {
 		this._super();
 		this.calculate_total_advance("Purchase Invoice", "advance_allocation_details");
 		this.frm.refresh_fields();
 	},
-	
+
 	calculate_item_values: function() {
 		var me = this;
-		
+
 		$.each(this.frm.item_doclist, function(i, item) {
 			frappe.model.round_floats_in(item);
 			item.amount = flt(item.rate * item.qty, precision("amount", item));
 			item.item_tax_amount = 0.0;
-			
+
 			me._set_in_company_currency(item, "price_list_rate", "base_price_list_rate");
 			me._set_in_company_currency(item, "rate", "base_rate");
 			me._set_in_company_currency(item, "amount", "base_amount");
 		});
-		
+
 	},
-	
+
 	calculate_net_total: function() {
 		var me = this;
 
@@ -202,57 +202,57 @@
 			me.frm.doc.net_total += item.base_amount;
 			me.frm.doc.net_total_import += item.amount;
 		});
-		
+
 		frappe.model.round_floats_in(this.frm.doc, ["net_total", "net_total_import"]);
 	},
-	
+
 	calculate_totals: function() {
 		var tax_count = this.frm.tax_doclist.length;
-		this.frm.doc.grand_total = flt(tax_count ? 
+		this.frm.doc.grand_total = flt(tax_count ?
 			this.frm.tax_doclist[tax_count - 1].total : this.frm.doc.net_total,
 			precision("grand_total"));
-		this.frm.doc.grand_total_import = flt(this.frm.doc.grand_total / 
+		this.frm.doc.grand_total_import = flt(this.frm.doc.grand_total /
 			this.frm.doc.conversion_rate, precision("grand_total_import"));
-			
+
 		this.frm.doc.total_tax = flt(this.frm.doc.grand_total - this.frm.doc.net_total,
 			precision("total_tax"));
-		
+
 		// rounded totals
 		if(frappe.meta.get_docfield(this.frm.doc.doctype, "rounded_total", this.frm.doc.name)) {
 			this.frm.doc.rounded_total = Math.round(this.frm.doc.grand_total);
 		}
-		
+
 		if(frappe.meta.get_docfield(this.frm.doc.doctype, "rounded_total_import", this.frm.doc.name)) {
 			this.frm.doc.rounded_total_import = Math.round(this.frm.doc.grand_total_import);
 		}
-		
+
 		// other charges added/deducted
 		this.frm.doc.other_charges_added = 0.0
 		this.frm.doc.other_charges_deducted = 0.0
 		if(tax_count) {
-			this.frm.doc.other_charges_added = frappe.utils.sum($.map(this.frm.tax_doclist, 
-				function(tax) { return (tax.add_deduct_tax == "Add" 
-					&& in_list(["Valuation and Total", "Total"], tax.category)) ? 
+			this.frm.doc.other_charges_added = frappe.utils.sum($.map(this.frm.tax_doclist,
+				function(tax) { return (tax.add_deduct_tax == "Add"
+					&& in_list(["Valuation and Total", "Total"], tax.category)) ?
 					tax.tax_amount : 0.0; }));
-		
-			this.frm.doc.other_charges_deducted = frappe.utils.sum($.map(this.frm.tax_doclist, 
-				function(tax) { return (tax.add_deduct_tax == "Deduct" 
-					&& in_list(["Valuation and Total", "Total"], tax.category)) ? 
+
+			this.frm.doc.other_charges_deducted = frappe.utils.sum($.map(this.frm.tax_doclist,
+				function(tax) { return (tax.add_deduct_tax == "Deduct"
+					&& in_list(["Valuation and Total", "Total"], tax.category)) ?
 					tax.tax_amount : 0.0; }));
-			
+
 			frappe.model.round_floats_in(this.frm.doc,
 				["other_charges_added", "other_charges_deducted"]);
 		}
 		this.frm.doc.other_charges_added_import = flt(this.frm.doc.other_charges_added /
 			this.frm.doc.conversion_rate, precision("other_charges_added_import"));
-		this.frm.doc.other_charges_deducted_import = flt(this.frm.doc.other_charges_deducted / 
+		this.frm.doc.other_charges_deducted_import = flt(this.frm.doc.other_charges_deducted /
 			this.frm.doc.conversion_rate, precision("other_charges_deducted_import"));
 	},
-	
+
 	_cleanup: function() {
 		this._super();
 		this.frm.doc.in_words = this.frm.doc.in_words_import = "";
-		
+
 		if(this.frm.item_doclist.length) {
 			if(!frappe.meta.get_docfield(this.frm.item_doclist[0].doctype, "item_tax_amount", this.frm.doctype)) {
 				$.each(this.frm.item_doclist, function(i, item) {
@@ -269,7 +269,7 @@
 			}
 		}
 	},
-	
+
 	calculate_outstanding_amount: function() {
 		if(this.frm.doc.doctype == "Purchase Invoice" && this.frm.doc.docstatus < 2) {
 			frappe.model.round_floats_in(this.frm.doc, ["grand_total", "total_advance", "write_off_amount"]);
@@ -279,11 +279,11 @@
 				precision("outstanding_amount"));
 		}
 	},
-	
+
 	set_item_tax_amount: function(item, tax, current_tax_amount) {
 		// item_tax_amount is the total tax amount applied on that item
-		// stored for valuation 
-		// 
+		// stored for valuation
+		//
 		// TODO: rename item_tax_amount to valuation_tax_amount
 		if(["Valuation", "Valuation and Total"].indexOf(tax.category) != -1 &&
 			frappe.meta.get_docfield(item.doctype, "item_tax_amount", item.parent || item.name)) {
@@ -291,11 +291,11 @@
 				item.item_tax_amount += flt(current_tax_amount, precision("item_tax_amount", item));
 		}
 	},
-	
+
 	change_form_labels: function(company_currency) {
 		var me = this;
 		var field_label_map = {};
-		
+
 		var setup_field_label_map = function(fields_list, currency) {
 			$.each(fields_list, function(i, fname) {
 				var docfield = frappe.meta.docfield_map[me.frm.doc.doctype][fname];
@@ -305,31 +305,31 @@
 				}
 			});
 		};
-		
-		
+
+
 		setup_field_label_map(["net_total", "total_tax", "grand_total", "in_words",
-			"other_charges_added", "other_charges_deducted", 
+			"other_charges_added", "other_charges_deducted",
 			"outstanding_amount", "total_advance", "total_amount_to_pay", "rounded_total"],
 			company_currency);
-		
+
 		setup_field_label_map(["net_total_import", "grand_total_import", "in_words_import",
 			"other_charges_added_import", "other_charges_deducted_import"], this.frm.doc.currency);
-		
-		cur_frm.set_df_property("conversion_rate", "description", "1 " + this.frm.doc.currency 
+
+		cur_frm.set_df_property("conversion_rate", "description", "1 " + this.frm.doc.currency
 			+ " = [?] " + company_currency);
-		
+
 		if(this.frm.doc.price_list_currency && this.frm.doc.price_list_currency!=company_currency) {
-			cur_frm.set_df_property("plc_conversion_rate", "description", "1 " + this.frm.doc.price_list_currency 
+			cur_frm.set_df_property("plc_conversion_rate", "description", "1 " + this.frm.doc.price_list_currency
 				+ " = [?] " + company_currency);
 		}
-		
+
 		// toggle fields
-		this.frm.toggle_display(["conversion_rate", "net_total", "grand_total", 
+		this.frm.toggle_display(["conversion_rate", "net_total", "grand_total",
 			"in_words", "other_charges_added", "other_charges_deducted"],
 			this.frm.doc.currency !== company_currency);
-		
-		this.frm.toggle_display(["plc_conversion_rate", "price_list_currency"], 
-			this.frm.doc.price_list_currency !== company_currency);		
+
+		this.frm.toggle_display(["plc_conversion_rate", "price_list_currency"],
+			this.frm.doc.price_list_currency !== company_currency);
 
 		// set labels
 		$.each(field_label_map, function(fname, label) {
@@ -337,46 +337,46 @@
 		});
 
 	},
-	
+
 	change_grid_labels: function(company_currency) {
 		var me = this;
 		var field_label_map = {};
-		
+
 		var setup_field_label_map = function(fields_list, currency, parentfield) {
 			var grid_doctype = me.frm.fields_dict[parentfield].grid.doctype;
 			$.each(fields_list, function(i, fname) {
 				var docfield = frappe.meta.docfield_map[grid_doctype][fname];
 				if(docfield) {
 					var label = __(docfield.label || "").replace(/\([^\)]*\)/g, "");
-					field_label_map[grid_doctype + "-" + fname] = 
+					field_label_map[grid_doctype + "-" + fname] =
 						label.trim() + " (" + currency + ")";
 				}
 			});
 		};
-		
+
 		setup_field_label_map(["base_rate", "base_price_list_rate", "base_amount", "base_rate"],
 			company_currency, this.fname);
-		
+
 		setup_field_label_map(["rate", "price_list_rate", "amount"],
 			this.frm.doc.currency, this.fname);
-		
+
 		if(this.frm.fields_dict[this.other_fname]) {
 			setup_field_label_map(["tax_amount", "total"], company_currency, this.other_fname);
 		}
-		
+
 		if(this.frm.fields_dict["advance_allocation_details"]) {
 			setup_field_label_map(["advance_amount", "allocated_amount"], company_currency,
 				"advance_allocation_details");
 		}
-		
+
 		// toggle columns
 		var item_grid = this.frm.fields_dict[this.fname].grid;
 		var fieldnames = $.map(["base_rate", "base_price_list_rate", "base_amount", "base_rate"], function(fname) {
 			return frappe.meta.get_docfield(item_grid.doctype, fname, me.frm.docname) ? fname : null;
 		});
-		
+
 		item_grid.set_column_disp(fieldnames, this.frm.doc.currency != company_currency);
-		
+
 		// set labels
 		var $wrapper = $(this.frm.wrapper);
 		$.each(field_label_map, function(fname, label) {
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index c33039f..69f5c95 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -5,6 +5,7 @@
 import frappe
 from frappe.utils import cstr, flt
 from frappe import msgprint, _, throw
+from frappe.model.mapper import get_mapped_doc
 from erpnext.controllers.buying_controller import BuyingController
 
 class PurchaseOrder(BuyingController):
@@ -180,10 +181,9 @@
 
 @frappe.whitelist()
 def make_purchase_receipt(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
-
 	def set_missing_values(source, target):
 		target.run_method("set_missing_values")
+		target.run_method("calculate_taxes_and_totals")
 
 	def update_item(obj, target, source_parent):
 		target.qty = flt(obj.qty) - flt(obj.received_qty)
@@ -218,10 +218,9 @@
 
 @frappe.whitelist()
 def make_purchase_invoice(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
-
 	def set_missing_values(source, target):
 		target.run_method("set_missing_values")
+		target.run_method("calculate_taxes_and_totals")
 
 	def update_item(obj, target, source_parent):
 		target.amount = flt(obj.amount) - flt(obj.billed_amt)
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
index 84eeccf..74a37b3 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.py
@@ -3,6 +3,7 @@
 
 from __future__ import unicode_literals
 import frappe
+from frappe.model.mapper import get_mapped_doc
 
 from erpnext.controllers.buying_controller import BuyingController
 class SupplierQuotation(BuyingController):
@@ -52,11 +53,10 @@
 
 @frappe.whitelist()
 def make_purchase_order(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
-
 	def set_missing_values(source, target):
 		target.run_method("set_missing_values")
 		target.run_method("get_schedule_dates")
+		target.run_method("calculate_taxes_and_totals")
 
 	def update_item(obj, target, source_parent):
 		target.conversion_factor = 1
diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py
index db3d851..0722798 100644
--- a/erpnext/controllers/buying_controller.py
+++ b/erpnext/controllers/buying_controller.py
@@ -11,10 +11,6 @@
 from erpnext.controllers.stock_controller import StockController
 
 class BuyingController(StockController):
-	def onload_post_render(self):
-		# contact, address, item details
-		self.set_missing_values()
-
 	def validate(self):
 		super(BuyingController, self).validate()
 		if getattr(self, "supplier", None) and not self.supplier_name:
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index c3fbd6b..e34f159 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -10,10 +10,6 @@
 from erpnext.controllers.stock_controller import StockController
 
 class SellingController(StockController):
-	def onload_post_render(self):
-		# contact, address, item details and pos details (if applicable)
-		self.set_missing_values()
-
 	def validate(self):
 		super(SellingController, self).validate()
 		self.validate_max_discount()
diff --git a/erpnext/public/js/transaction.js b/erpnext/public/js/transaction.js
index 067302e..f101aed 100644
--- a/erpnext/public/js/transaction.js
+++ b/erpnext/public/js/transaction.js
@@ -39,20 +39,7 @@
 	onload_post_render: function() {
 		var me = this;
 		if(this.frm.doc.__islocal && this.frm.doc.company && !this.frm.doc.is_pos) {
-			if(!this.frm.doc.customer || !this.frm.doc.supplier) {
-				return this.frm.call({
-					doc: this.frm.doc,
-					method: "onload_post_render",
-					freeze: true,
-					callback: function(r) {
-						// remove this call when using client side mapper
-						me.set_dynamic_labels();
-						me.calculate_taxes_and_totals();
-					}
-				});
-			} else {
-				this.calculate_taxes_and_totals();
-			}
+			this.calculate_taxes_and_totals();
 		}
 	},
 
diff --git a/erpnext/selling/doctype/lead/lead.py b/erpnext/selling/doctype/lead/lead.py
index 525e451..4f48542 100644
--- a/erpnext/selling/doctype/lead/lead.py
+++ b/erpnext/selling/doctype/lead/lead.py
@@ -6,7 +6,7 @@
 from frappe import _
 from frappe.utils import cstr, validate_email_add, cint, comma_and
 from frappe import session
-
+from frappe.model.mapper import get_mapped_doc
 
 from erpnext.controllers.selling_controller import SellingController
 
@@ -76,8 +76,6 @@
 	return _make_customer(source_name, target_doc)
 
 def _make_customer(source_name, target_doc=None, ignore_permissions=False):
-	from frappe.model.mapper import get_mapped_doc
-
 	def set_missing_values(source, target):
 		if source.company_name:
 			target.customer_type = "Company"
@@ -103,8 +101,6 @@
 
 @frappe.whitelist()
 def make_opportunity(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
-
 	doclist = get_mapped_doc("Lead", source_name,
 		{"Lead": {
 			"doctype": "Opportunity",
diff --git a/erpnext/selling/doctype/opportunity/opportunity.py b/erpnext/selling/doctype/opportunity/opportunity.py
index 41b42ea..ba331f9 100644
--- a/erpnext/selling/doctype/opportunity/opportunity.py
+++ b/erpnext/selling/doctype/opportunity/opportunity.py
@@ -3,11 +3,9 @@
 
 from __future__ import unicode_literals
 import frappe
-
 from frappe.utils import cstr, cint
-
 from frappe import msgprint, _
-
+from frappe.model.mapper import get_mapped_doc
 
 from erpnext.utilities.transaction_base import TransactionBase
 
@@ -129,11 +127,9 @@
 
 @frappe.whitelist()
 def make_quotation(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
-
 	def set_missing_values(source, target):
 		quotation = frappe.get_doc(target)
-		quotation.run_method("onload_post_render")
+		quotation.run_method("set_missing_values")
 		quotation.run_method("calculate_taxes_and_totals")
 
 	doclist = get_mapped_doc("Opportunity", source_name, {
diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py
index 652a934..9843853 100644
--- a/erpnext/selling/doctype/quotation/quotation.py
+++ b/erpnext/selling/doctype/quotation/quotation.py
@@ -4,7 +4,7 @@
 from __future__ import unicode_literals
 import frappe
 from frappe.utils import cstr
-
+from frappe.model.mapper import get_mapped_doc
 from frappe import _
 
 from erpnext.controllers.selling_controller import SellingController
@@ -96,8 +96,6 @@
 	return _make_sales_order(source_name, target_doc)
 
 def _make_sales_order(source_name, target_doc=None, ignore_permissions=False):
-	from frappe.model.mapper import get_mapped_doc
-
 	customer = _make_customer(source_name, ignore_permissions)
 
 	def set_missing_values(source, target):
@@ -105,9 +103,9 @@
 			target.customer = customer.name
 			target.customer_name = customer.customer_name
 
-		si = frappe.get_doc(target)
-		si.ignore_permissions = ignore_permissions
-		si.run_method("onload_post_render")
+		target.ignore_permissions = ignore_permissions
+		target.run_method("set_missing_values")
+		target.run_method("calculate_taxes_and_totals")
 
 	doclist = get_mapped_doc("Quotation", source_name, {
 			"Quotation": {
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index aa87e1e..2b60dcd 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -247,7 +247,8 @@
 		return "order" if self.docstatus==1 else None
 
 def set_missing_values(source, target):
-	target.run_method("onload_post_render")
+	target.run_method("set_missing_values")
+	target.run_method("calculate_taxes_and_totals")
 
 @frappe.whitelist()
 def make_material_request(source_name, target_doc=None):
@@ -316,7 +317,8 @@
 def make_sales_invoice(source_name, target_doc=None):
 	def set_missing_values(source, target):
 		target.is_pos = 0
-		target.run_method("onload_post_render")
+		target.run_method("set_missing_values")
+		target.run_method("calculate_taxes_and_totals")
 
 	def update_item(source, target, source_parent):
 		target.amount = flt(source.amount) - flt(source.billed_amt)
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 95882c6..5ea5b6b 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -275,13 +275,14 @@
 	invoiced_qty_map = get_invoiced_qty_map(source_name)
 
 	def update_accounts(source, target):
-		si = frappe.get_doc(target)
-		si.is_pos = 0
-		si.run_method("onload_post_render")
+		target.is_pos = 0
+		target.run_method("set_missing_values")
 
-		if len(si.get("entries")) == 0:
+		if len(target.get("entries")) == 0:
 			frappe.throw(_("All these items have already been invoiced"))
 
+		target.run_method("calculate_taxes_and_totals")
+
 	def update_item(source_doc, target_doc, source_parent):
 		target_doc.qty = source_doc.qty - invoiced_qty_map.get(source_doc.name, 0)
 
diff --git a/erpnext/stock/doctype/material_request/material_request.py b/erpnext/stock/doctype/material_request/material_request.py
index aa1ec29..f8f0d09 100644
--- a/erpnext/stock/doctype/material_request/material_request.py
+++ b/erpnext/stock/doctype/material_request/material_request.py
@@ -9,6 +9,7 @@
 
 from frappe.utils import cstr, flt
 from frappe import _
+from frappe.model.mapper import get_mapped_doc
 
 from erpnext.controllers.buying_controller import BuyingController
 class MaterialRequest(BuyingController):
@@ -208,8 +209,8 @@
 			})
 
 def set_missing_values(source, target_doc):
-	po = frappe.get_doc(target_doc)
-	po.run_method("set_missing_values")
+	target_doc.run_method("set_missing_values")
+	target_doc.run_method("calculate_taxes_and_totals")
 
 def update_item(obj, target, source_parent):
 	target.conversion_factor = 1
@@ -217,8 +218,6 @@
 
 @frappe.whitelist()
 def make_purchase_order(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
-
 	doclist = get_mapped_doc("Material Request", source_name, 	{
 		"Material Request": {
 			"doctype": "Purchase Order",
@@ -244,23 +243,19 @@
 
 @frappe.whitelist()
 def make_purchase_order_based_on_supplier(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
 	if target_doc:
 		if isinstance(target_doc, basestring):
 			import json
 			target_doc = frappe.get_doc(json.loads(target_doc))
-		target_doc = target_doc.get({"parentfield": ["!=", "po_details"]})
+		target_doc.set("po_details", [])
 
 	material_requests, supplier_items = get_material_requests_based_on_supplier(source_name)
 
 	def postprocess(source, target_doc):
-		target_doc[0].supplier = source_name
+		target_doc.supplier = source_name
 		set_missing_values(source, target_doc)
-
-		po_items = target_doc.get({"parentfield": "po_details"})
-		target_doc = target_doc.get({"parentfield": ["!=", "po_details"]}) + \
-			[d for d in po_items
-				if d.get("item_code") in supplier_items and d.get("qty") > 0]
+		target_doc.set("po_details", [d for d in target_doc.get("po_details")
+			if d.get("item_code") in supplier_items and d.get("qty" > 0)])
 
 		return target_doc
 
@@ -282,7 +277,7 @@
 			}
 		}, target_doc, postprocess)
 
-	return target_doc.as_dict()
+	return target_doc
 
 def get_material_requests_based_on_supplier(supplier):
 	supplier_items = [d[0] for d in frappe.db.get_values("Item",
@@ -300,8 +295,6 @@
 
 @frappe.whitelist()
 def make_supplier_quotation(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
-
 	doclist = get_mapped_doc("Material Request", source_name, {
 		"Material Request": {
 			"doctype": "Supplier Quotation",
@@ -324,8 +317,6 @@
 
 @frappe.whitelist()
 def make_stock_entry(source_name, target_doc=None):
-	from frappe.model.mapper import get_mapped_doc
-
 	def update_item(obj, target, source_parent):
 		target.conversion_factor = 1
 		target.qty = flt(obj.qty) - flt(obj.ordered_qty)
@@ -333,8 +324,7 @@
 
 	def set_missing_values(source, target):
 		target.purpose = "Material Transfer"
-		se = frappe.get_doc(target)
-		se.run_method("get_stock_and_rate")
+		target.run_method("get_stock_and_rate")
 
 	doclist = get_mapped_doc("Material Request", source_name, {
 		"Material Request": {
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index f9ea084..9b3d0a9 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -294,6 +294,7 @@
 	def set_missing_values(source, target):
 		doc = frappe.get_doc(target)
 		doc.run_method("set_missing_values")
+		doc.run_method("calculate_taxes_and_totals")
 
 	doclist = get_mapped_doc("Purchase Receipt", source_name,	{
 		"Purchase Receipt": {
