From ca79db7cd2fbc3898128958fb940626522ac7d9a Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 5 Dec 2012 15:12:23 +0530 Subject: [PATCH] fixes in filters --- public/js/wn/ui/filters.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/js/wn/ui/filters.js b/public/js/wn/ui/filters.js index 466e72c09b..01eb60d598 100644 --- a/public/js/wn/ui/filters.js +++ b/public/js/wn/ui/filters.js @@ -297,7 +297,9 @@ wn.ui.FieldSelect = Class.extend({ var me = this; me.table_fields = []; var std_filters = $.map(wn.model.std_fields, function(d) { - return $.extend(copy_dict(d), {parent: me.doctype}); + var opts = {parent: me.doctype} + if(d.fieldname=="name") opts.options = me.doctype; + return $.extend(copy_dict(d), opts); }); // add parenttype column @@ -307,7 +309,7 @@ wn.ui.FieldSelect = Class.extend({ fieldname: 'parent', fieldtype: 'Data', label: 'Parent', - parent: me.doctype + parent: me.doctype, }]); }