mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 22:49:19 +00:00
[fix] changed text > text editor for description fields in tables
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
## temp utility
|
||||
|
||||
import frappe
|
||||
|
||||
def update_doctypes():
|
||||
for d in frappe.db.sql("""select df.parent, df.fieldname
|
||||
from tabDocField df, tabDocType dt where df.fieldname
|
||||
like "%description%" and df.parent = dt.name and dt.istable = 1""", as_dict=1):
|
||||
dt = frappe.get_doc("DocType", d.parent)
|
||||
|
||||
for f in dt.fields:
|
||||
if f.fieldname == d.fieldname and f.fieldtype in ("Text", "Small Text"):
|
||||
print f.parent, f.fieldname
|
||||
f.fieldtype = "Text Editor"
|
||||
dt.save()
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user