Merge lp:~openerp-dev/openobject-addons/jam-dev-addons into lp:~openerp-dev/openobject-addons/trunk-dev-addons1

Proposed by Jigar A.
Status: Merged
Merged at revision: 4697
Proposed branch: lp:~openerp-dev/openobject-addons/jam-dev-addons
Merge into: lp:~openerp-dev/openobject-addons/trunk-dev-addons1
Diff against target: 28 lines (+4/-3)
2 files modified
survey/survey.py (+1/-1)
survey/wizard/survey_answer.py (+3/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/jam-dev-addons
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+46589@code.launchpad.net

Description of the change

Hello,
    Problems fixed and Propose for merging
     + Survey default_get fixed
     + Survey descriptive field boll error fixed
    Kindly Review it.
Thank You.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'survey/survey.py'
2--- survey/survey.py 2011-01-14 00:11:01 +0000
3+++ survey/survey.py 2011-01-18 12:19:13 +0000
4@@ -184,7 +184,7 @@
5 if len(context['line_order'][-1]) > 2 and type(context['line_order'][-1][2]) == type({}) and context['line_order'][-1][2].has_key('sequence'):
6 data['sequence'] = context['line_order'][-1][2]['sequence'] + 1
7 if context.has_key('survey_id'):
8- data['survey_id'] = context['survey_id']
9+ data['survey_id'] = context.get('survey_id', False)
10 return data
11
12 def survey_save(self, cr, uid, ids, context=None):
13
14=== modified file 'survey/wizard/survey_answer.py'
15--- survey/wizard/survey_answer.py 2011-01-14 00:11:01 +0000
16+++ survey/wizard/survey_answer.py 2011-01-18 12:19:13 +0000
17@@ -297,8 +297,9 @@
18 fields[tools.ustr(que.id) + "_" + tools.ustr(ans.id)] = {'type':'datetime', 'string':ans.answer}
19
20 elif que_rec.type == 'descriptive_text':
21- for que_test in que_rec.descriptive_text.split('\n'):
22- etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_test)), 'align':"0.0"})
23+ if que_rec.descriptive_text:
24+ for que_test in que_rec.descriptive_text.split('\n'):
25+ etree.SubElement(xml_group, 'label', {'string': to_xml(tools.ustr(que_test)), 'align':"0.0"})
26
27 elif que_rec.type == 'single_textbox':
28 etree.SubElement(xml_group, 'field', {'readonly' :str(readonly), 'name': tools.ustr(que.id) + "_single", 'nolabel':"1" ,'colspan':"4"})

Subscribers

People subscribed via source and target branches