patch for renaming the pos profile and setting the pos profile name
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index fd7a1b4..486cd7c 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -455,3 +455,4 @@
erpnext.patches.v9_0.set_variant_item_description
erpnext.patches.v9_0.set_uoms_in_variant_field
erpnext.patches.v9_0.copy_old_fees_field_data
+erpnext.patches.v9_0.set_pos_profile_name
diff --git a/erpnext/patches/v9_0/set_pos_profile_name.py b/erpnext/patches/v9_0/set_pos_profile_name.py
new file mode 100644
index 0000000..bc6e50e
--- /dev/null
+++ b/erpnext/patches/v9_0/set_pos_profile_name.py
@@ -0,0 +1,19 @@
+# Copyright (c) 2017, Frappe and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+
+def execute():
+ doctype = 'POS Profile'
+ frappe.reload_doctype(doctype)
+
+ for pos in frappe.get_all(doctype):
+ doc = frappe.get_doc(doctype, pos.name)
+
+ if not doc.user: continue
+
+ doc.pos_profile_name = doc.user + ' - ' + doc.company
+ doc.save()
+
+ frappe.rename_doc(doctype, doc.name, doc.pos_profile_name, force=True)
\ No newline at end of file