@frappe.whitelist()
def quick_kanban_board(doctype, board_name, field_name):
 doc = frappe.new_doc(u'Kanban Board')
 options = frappe.get_value(u'DocField', dict(parent=doctype, fieldname=field_name), u'options')
 columns = []
 if options:
  columns = options.split(u'\n')
 for column in columns:
  if (not column):
   continue
  doc.append(u'columns', dict(column_name=column))
 doc.kanban_board_name = board_name
 doc.reference_doctype = doctype
 doc.field_name = field_name
 doc.save()
 return doc

@ frappe . whitelist ( ) def quick_kanban_board ( doctype , board_name , field_name ) : doc = frappe . new_doc ( u'Kanban Board' ) options = frappe . get_value ( u'DocField' , dict ( parent = doctype , fieldname = field_name ) , u'options' ) columns = [ ] if options : columns = options . split ( u'\n' ) for column in columns : if ( not column ) : continue doc . append ( u'columns' , dict ( column_name = column ) ) doc . kanban_board_name = board_name doc . reference_doctype = doctype doc . field_name = field_name doc . save ( ) return doc
create new kanbanboard quickly with default options .