mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-21 10:19:57 +00:00
fix: filter purchase_person dropdown to non-group enabled records only
Adds a set_query on purchase_person in the purchase_team child table so the dropdown excludes group nodes (like "Purchase Team") and disabled records, matching the same filter used for sales_person in Sales Team. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,15 @@ erpnext.buying = {
|
||||
me.frm.set_query("supplier_address", erpnext.queries.address_query);
|
||||
|
||||
me.frm.set_query("billing_address", erpnext.queries.company_address_query);
|
||||
|
||||
me.frm.set_query("purchase_person", "purchase_team", function () {
|
||||
return {
|
||||
filters: {
|
||||
is_group: 0,
|
||||
enabled: 1,
|
||||
},
|
||||
};
|
||||
});
|
||||
erpnext.accounts.dimensions.setup_dimension_filters(me.frm, me.frm.doctype);
|
||||
|
||||
this.frm.set_query("item_code", "items", function () {
|
||||
|
||||
Reference in New Issue
Block a user