You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 line
420 B

  1. # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
  2. # MIT License. See license.txt
  3. import frappe
  4. def execute():
  5. for name in frappe.db.sql_list("""select name from `tabCustom Field`
  6. where fieldtype="Select" and options like "link:%" """):
  7. custom_field = frappe.get_doc("Custom Field", name)
  8. custom_field.fieldtype = "Link"
  9. custom_field.options = custom_field.options[5:]
  10. custom_field.save()