[FIX] survey
bzr revid: hmo@tinyerp.com-20100708065524-om7tr8bgwxpj309z
This commit is contained in:
parent
47634300f2
commit
00b3aab160
|
@ -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}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue