Add item to list

How can i add an item to list? Im trying do this creating a new doctype, but this is not working at all…

Not understood. Can you explain bit more?

I need to add one more item to this list, in case it would be “Client, Vendor and Contributor”

tipo de sujeito is this link of Doctype? If you want to add more items to it. Then Create New Doctypes. It will appear in this list.

Right, but I already created several types of doctype and it does not appear in the list, I have already cleaned the cache and updated the ERP…
What configuration do I have to use for it to appear in the list just like the others?

Please check Custom? is unchecked for your doctypes.

When i select to create an new doctype, the custom field is automatically selected… Can you create some item to list and show me how was on the list?


Uncheck the Custom? and save the all doctypes again. Reload the page and check.

I wanna fetch an existing DocType: Employee

in js file add
frappe.ui.form.on(‘Penalties Settings’, {
refresh: function(frm) {

onload:function (frm) {
	 frm.set_query("child filed","parent field",  function() {
		return {
			query: "",
			args: {}



in .py file
use this and you can see that i add union in sql statement to appent the new item

def get_salary_components(doctype, txt, searchfield, start, page_len, filters):
conditions =
return frappe.db.sql(“”"select name, salary_component from tabSalary Component
where type = ‘Earning’
and docstatus < 2
and ({key} like %(txt)s
or salary_component like %(txt)s)
{fcond} {mcond}
select ‘base’ ,‘base’ from dual
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
if(locate(%(_txt)s, salary_component), locate(%(_txt)s, salary_component), 99999),

			name, salary_component
		limit %(start)s, %(page_len)s""".format(**{
			'key': searchfield,
			'fcond': get_filters_cond(doctype, filters, conditions),
			'mcond': get_match_cond(doctype)
			}), {
			 'txt': "%%%s%%" % txt,
			 '_txt': txt.replace("%", ""),
			 'start': start,
			 'page_len': page_len