How to update correctly child table results in Global Search?

Hi all,

I try on here …

Is there any way to avoid child table result to be displayed in global search? See pic:

Searching for supplier_part_no : 005016 it shows all (actual and past) results from Item Supplier and the result from Item.

Clicking on one of Item Supplier result i get:

So it’s quite unuseful having child table result, it’s better to show only parent related results.

So, how to display result only for Item?

Thx

You can disable the global_search checkbox in the child table’s doctype. That should solve the issue.

@Zlash65 Thx for the hint but it’s not possible from Customize Form; other than that on Item Supplier it’s not enabled, see pic:

@Zlash65 I got how to make unavailable/available field in Global Search, thx.

Now i’ve found a couple of “bugs”:

  1. When you delete an Item, the related Item Price are not deleted from Global Search.

  2. If you save Item Supplier directly from code, like:

item_supplier = frappe.get_doc("Item Supplier", name)
item_supplier.supplier_part_no = '123454'
item_supplier.save()

for some reasons it get added to Global Search as shown above.

Can you confirm it’s by design?

Thx

Hey @JoEz,

Remember to share the solutions that you find along the way throughout the community.

Best regards

@yefritavarez it’s quite simple … just check in Global Search on field options. See pic:

Actually the other 2 things are driving me crazy …it seems i need to re-write big parts of the code … :scream: :sob:

Should have mentioned child table’s docfield for disabling that, my bad :sweat_smile:
Will look and verify those bugs and get back to you…:+1: