Show child field in Standard Filter

@jof2jc

  1. in custom app’s hooks.py
    uncomment and modify the line as below


    doctype_list_js = {"Sales Invoice" : "public/js/sales_invoice_list.js"}

  2. in your custom app public/js/sales_invoice_list.js file copy the code below


    frappe.listview_settings[‘Sales Invoice’] = {

     onload: function (listview) {
    
         var df = {
    
             fieldname: "item_code",
    
             label:"Item Code",
    
             fieldtype: "Link",
    
             options:"Item",
    
             onchange: function(){
    
                 listview.start = 0;
    
                 listview.refresh();
    
                 listview.on_filter_change();
    
             },
    
         }
    
         listview.page.add_field(df);
    
     }
    

    };

  3. Final result

3 Likes