New App. How to filter child table with custom field

Hello everyone

I have a problem filling a child table, I need only Customer type “Cadenas”, however all types of customer appear, how do I filter this ?, I attach images of everything created.

Doctype to repair: Listear

Sorry for the little knowledge of the subject, I am new in frappe framework, I have already studied other solutions of the subject and I still can not find the solution.

What needs to be done to repair the child table.

Thanks for the help.

Someone help me please.

This is the code that I have, is it wrong?

frappe.ui.form.on("Listear", "onload", function(frm, cdt, cdn){
	frappe.msgprint("TEST");
	cur_frm.fields_dict["clientes"].grid.get_field("cliente").get_query = function(doc){
	       return {
	               filters:{
	                       "customer_type_link": "Cadena"
	               }
	       }
	}   
});

In the screenshot the fieldname is clientes but you have written for cliente

Hi, thanks for the reply.

I have tried changing cliente to clientes, but it still does not work.

frappe.ui.form.on("Listear", "onload", function(frm, cdt, cdn){
	frappe.msgprint("TEST");
	cur_frm.fields_dict["clientes"].grid.get_field("clientes").get_query = function(doc){
	       return {
	               filters:{
	                       "customer_type_link": "Cadena"
	               }
	       }
	}		
});

I do not know if I’m wrong but this is how I understand this script, I’ll detail it below in other screenshot:

Could it be that I’m wrong, please correct me.