Skip to content

Commit

Permalink
feat: support po row search
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Jan 1, 2025
1 parent 6d32ea2 commit fb2faa5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def po_item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=F
purchase_order = frappe.get_cached_doc("Purchase Order", purchase_order)
purchase_order.check_permission("read")

return [
results = [
[
row.name,
_("Row {0}").format(row.idx),
Expand All @@ -583,6 +583,11 @@ def po_item_query(doctype, txt, searchfield, start, page_len, filters, as_dict=F
if not item_code or row.item_code == item_code
]

if not txt:
return results

return [row for row in results if txt in ", ".join(row)]


@frappe.whitelist()
def get_po_item_details(po_detail: str):
Expand Down

0 comments on commit fb2faa5

Please sign in to comment.