Adds a dialog mirroring the Account selection UX for the
receipt_document (purchase_receipts) and vendor_invoice (vendor_invoices)
fields. Intercepts the standard Advanced Search (LinkSelector) for these
fields with a fullscreen dialog featuring a Supplier Group tree on the
left, resizable panels, search, custom filters bar, sortable table and
pagination.
Backend adds get_documents_for_selection (PI/PR/SE/SR with the same
filters ERPNext applies in set_query), get_vendor_invoices_for_selection
(replicates erpnext.stock...get_vendor_invoice_query — unclaimed_amount
> 0, no stock items, etc.), and get_supplier_groups_tree.
Extract link filters from the source control's set_query/df.filters
and pass them to the backend. This ensures that field-specific
constraints (e.g. root_type=Expense, company filters) are respected
when selecting accounts through the custom dialog.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace standard Advanced Search with a custom two-column dialog
for Account link fields: tree navigation by account groups on the
left, filterable/sortable table with Select buttons on the right.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>