From 00b3aab1604b276733eb554e4f61decb0ead3313 Mon Sep 17 00:00:00 2001 From: "Harry (OpenERP)" Date: Thu, 8 Jul 2010 12:25:24 +0530 Subject: [PATCH] [FIX] survey bzr revid: hmo@tinyerp.com-20100708065524-om7tr8bgwxpj309z --- addons/survey/wizard/survey_selection.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/survey/wizard/survey_selection.py b/addons/survey/wizard/survey_selection.py index beb0fe6571f..6477f110dc3 100644 --- a/addons/survey/wizard/survey_selection.py +++ b/addons/survey/wizard/survey_selection.py @@ -67,7 +67,6 @@ class survey_name_wiz(osv.osv_memory): 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']: for i in group_id: if i in user_rec['groups_id']: result.append((sur.id, sur.title)) @@ -137,14 +136,13 @@ class survey_name_wiz(osv.osv_memory): def on_change_survey(self, cr, uid, ids, survey_id, context=None): """ on change event of survey_id field, if note is available in selected survey then display this note in note fields. - - @param self: The object pointer - @param cr: the current row, from the database cursor, - @param uid: the current user’s ID for security checks, @param ids: List of Survey IDs + @param survey_id: Id of Survey @param context: A standard dictionary for contextual values @return : Dictionary values of notes fields. """ + if not survey_id: + return {} notes = self.pool.get('survey').read(cr, uid, survey_id, ['note'])['note'] return {'value': {'note': notes}}