From b9ff042866f44c2de1745d50e658a0e883c31d55 Mon Sep 17 00:00:00 2001 From: "Vir (Open ERP)" Date: Mon, 21 Jun 2010 18:32:43 +0530 Subject: [PATCH] [IMP] Survey :Usability improvements bzr revid: vir@tinyerp.com-20100621130243-pw2i9zucrpf8h7ey --- addons/survey/survey_view.xml | 40 +++++++++++++++++++----- addons/survey/wizard/survey_selection.py | 12 ++++--- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/addons/survey/survey_view.xml b/addons/survey/survey_view.xml index e2643b127b7..2da132de509 100644 --- a/addons/survey/survey_view.xml +++ b/addons/survey/survey_view.xml @@ -3,7 +3,7 @@ - - -
+ + + @@ -170,6 +171,7 @@ + @@ -230,11 +232,11 @@ survey tree - + - + @@ -267,6 +269,12 @@ + + + + + + @@ -457,6 +465,22 @@ + + survey.page.list.select + survey.page + search + + + + + + + + + + + + Survey Pages survey.page @@ -668,9 +692,9 @@ - + + + survey_question_wizard_test diff --git a/addons/survey/wizard/survey_selection.py b/addons/survey/wizard/survey_selection.py index 002faa6f431..beb0fe6571f 100644 --- a/addons/survey/wizard/survey_selection.py +++ b/addons/survey/wizard/survey_selection.py @@ -62,15 +62,17 @@ class survey_name_wiz(osv.osv_memory): for sur in surv_obj.browse(cr, uid, [context.get('survey_id',False)]): result.append((sur.id, sur.title)) return result - group_id = self.pool.get('res.groups').search(cr, uid, [('name', '=', 'Survey / Manager')]) + group_id = self.pool.get('res.groups').search(cr, uid, [('name', 'in', ('Survey / Manager','Survey / User'))]) user_obj = self.pool.get('res.users') user_rec = user_obj.read(cr, uid, uid) for sur in surv_obj.browse(cr, uid, surv_obj.search(cr, uid, [])): if sur.state == 'open': - if group_id[0] in user_rec['groups_id']: - result.append((sur.id, sur.title)) - elif sur.id in user_rec['survey_id']: - result.append((sur.id, sur.title)) +# if group_id[0] in user_rec['groups_id']: + for i in group_id: + if i in user_rec['groups_id']: + result.append((sur.id, sur.title)) + elif sur.id in user_rec['survey_id']: + result.append((sur.id, sur.title)) return result _columns = {