From ed69892a0a8b4aecf0352c6f4eb63ac25e16a913 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 23 Jul 2013 15:16:50 +0530 Subject: [PATCH] [minor] [query] sales person --- selling/doctype/sales_common/sales_common.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/selling/doctype/sales_common/sales_common.js b/selling/doctype/sales_common/sales_common.js index a03b2894bc..e3e5f87f13 100644 --- a/selling/doctype/sales_common/sales_common.js +++ b/selling/doctype/sales_common/sales_common.js @@ -112,6 +112,14 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({ } }); } + + if(this.frm.fields_dict.sales_team && this.frm.fields_dict.sales_team.grid.get_field("sales_person")) { + this.frm.set_query("sales_person", "sales_team", function() { + return { + filters: { is_group: "No" } + }; + }); + } }, refresh: function(doc) {