[IMP] survey :- improve code in name_get method(if user give manually then user not required field).

bzr revid: ysa@tinyerp.co.in-20100511105456-eo6tnsai00kjk2zi
This commit is contained in:
Ysa (Open ERP)
2010-05-11 16:24:56 +05:30
parent bda6b316dc
commit c94db2ff4c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -609,7 +609,7 @@ class survey_response(osv.osv):
reads = self.read(cr, uid, ids, ['user_id','date_create'], context)
res = []
for record in reads:
name = record['user_id'][1] + ' (' + record['date_create'].split('.')[0] + ')'
name = (record['user_id'] and record['user_id'][1] or '' )+ ' (' + record['date_create'].split('.')[0] + ')'
res.append((record['id'], name))
return res
@@ -18,7 +18,7 @@
<separator colspan="4" />
<label align="0.0" colspan="2" string="" />
<button colspan="1" icon="gtk-cancel" special="cancel" string="Cancel"/>
<button colspan="1" icon="gtk-go-forward" name="action_next" string="Print" type="object"/>
<button colspan="1" icon="gtk-go-forward" name="action_next" string="Start" type="object"/>
</form>
</field>
</record>