[IMP] Survey : Improve the error message

bzr revid: asr@tinyerp.com-20110520133335-dlr703289wo3mwyt
This commit is contained in:
Ashutosh Srivastava (Open ERP) 2011-05-20 19:03:35 +05:30
parent ada1cee936
commit a506a7ab94
1 changed files with 2 additions and 3 deletions

View File

@ -97,9 +97,8 @@ class survey(osv.osv):
vals = {}
current_rec = self.read(cr, uid, ids, context=context)
if current_rec.has_key('state'):
val = current_rec['state']
if val['state'] in ('open'):
raise osv.except_osv(_('Error!'),_('Cannot open the duplicate survey in open state'))
if current_rec['state'] in ('open'):
raise osv.except_osv(_('Error!'),_("Cannot create the duplicate survey in open state"))
title = current_rec.get('title') + ' (Copy)'
vals.update({'title':title})
vals.update({'history':[],'tot_start_survey':0,'tot_comp_survey':0})