Error fixed in uom conversion rate fetching
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index a429b68..53304b0 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -53,7 +53,7 @@
     call_back = function(doc, cdt, cdn){
       cur_frm.cscript.calc_amount(doc, 2);
     }
-    str_arg = {'item_code':d.item_code, 'uom':d.uom, 'stock_qty':flt(d.stock_qty), 'qty': flt(d.qty)}
+    str_arg = {'item_code':d.item_code, 'uom':d.uom, 'stock_qty':flt(d.stock_qty), 'qty': flt(d.qty), 'conversion_rate':doc.conversion_rate}
     // Updates Conversion Factor, Qty and Purchase Rate
     get_server_fields('get_uom_details',JSON.stringify(str_arg), fname, doc,cdt,cdn,1, call_back);
     // don't make mistake of calling update_stock_qty() the get_uom_details returns stock_qty as per conversion factor properly
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py
index 84bfffb..5bade92 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.py
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.py
@@ -165,8 +165,8 @@
 				'qty'				: flt(arg['stock_qty']) / flt(uom[0]['conversion_factor']),
 				'purchase_ref_rate'	: (lpr and flt(lpr[0]['last_purchase_rate']) * flt(uom[0]['conversion_factor'])) or 0,
 				'purchase_rate'		: (lpr and flt(lpr[0]['last_purchase_rate']) * flt(uom[0]['conversion_factor'])) or 0,
-				'import_ref_rate'	: (lpr and flt(lpr[0]['last_purchase_rate']) * flt(uom[0]['conversion_factor'])/flt(self.doc.conversion_rate)) or 0,
-				'import_rate'		: (lpr and flt(lpr[0]['last_purchase_rate']) * flt(uom[0]['conversion_factor'])/flt(self.doc.conversion_rate)) or 0
+				'import_ref_rate'	: (lpr and flt(lpr[0]['last_purchase_rate']) * flt(uom[0]['conversion_factor'])/flt(arg['conversion_rate'])) or 0,
+				'import_rate'		: (lpr and flt(lpr[0]['last_purchase_rate']) * flt(uom[0]['conversion_factor'])/flt(arg['conversion_rate'])) or 0
 			}
 		
 		return ret