5085ed4986d3ad0357f72502a1ce234e36b1520d
[odoo/odoo.git] / addons / survey / survey_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5 <!--        <menuitem name="Survey Management" id="main_menu_survey" icon="terp-crm" sequence="1" groups="group_survey_manager,group_survey_user"/>-->
6                     <menuitem icon="STOCK_PREFERENCES" id="base.menu_tools" name="Tools"/>
7                         <menuitem name="Survey" id="main_menu_survey"
8                                  sequence="3" groups="group_survey_manager,group_survey_user"
9                                  parent="base.menu_tools" />
10                         <menuitem id="menu_defination" name="Defination" parent="main_menu_survey" sequence="1"/>
11 <!--        <menuitem name="Configuration" id="menu_survey_config" parent="main_menu_survey" groups="group_survey_manager"/>-->
12                         <menuitem name="Configuration" parent="base.menu_tools"
13                                 id="base.menu_lunch_survey_root" groups="group_survey_manager" sequence="6"/>
14                     <menuitem name="Surveys" id="menu_survey_config"
15                         parent="base.menu_lunch_survey_root" groups="group_survey_manager" sequence="2"/>
16         <!--
17             Survey
18         -->
19         <record model="ir.ui.view" id="survey_form">
20             <field name="name">survey_form</field>
21             <field name="model">survey</field>
22             <field name="type">form</field>
23             <field name="arch" type="xml">
24                 <form string="Survey">
25                         <field name="title" select="1"/>
26                         <group col="6" colspan="6">
27                             <field name="responsible_id"/>
28                                 <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
29                                 string="Test Survey" type="action" icon="gtk-new" context="{'active':True,'survey_id': active_id}"/>
30                                                 <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
31                                 string="Answer Survey" type="action" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'readonly':[('state','!=','open')]}"/>
32                                                 <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
33                                 string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
34                                         </group>
35                     <notebook colspan="4">
36                         <page string="Survey">
37                             <field name="page_ids" colspan="4" nolabel="1" mode="form,tree" context="{'line_order': page_ids}">
38                                 <form string="Survey Page">
39                                     <field name="title" select="1"/>
40                                     <field name="sequence"/>
41                                     <field name="note" colspan="4" nolabel="1"/>
42                                     <field name="question_ids" colspan="4" nolabel="1" context="{'line_order': question_ids}">
43                                         <form string="Survey Question">
44                                             <field name="question" colspan="4" select="1"/>
45                                             <field name="sequence"/>
46                                             <field name="tot_resp" select="2"/>
47                                             <field name="type" on_change="on_change_type(type)"/>
48                                                                     <field name="in_visible_rating_weight" invisible="1"/>
49                                                                     <field name="in_visible_menu_choice" invisible="1"/>
50                                                                     <notebook colspan="4">
51                                                                         <page string="Options">
52                                                                                                         <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','table')]}">
53                                                                                   <separator string="Answer" colspan="4"/>
54                                                                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
55                                                                                            <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}"/>
56                                                                                        </group>
57                                                                                        <group colspan="4" attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','table')]}">
58                                                                                            <field name="column_heading_ids" colspan="4" nolabel="1" default_get="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
59                                                                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
60                                                                                                                            <field name="no_of_rows"/>
61                                                                                                                         </group>
62                                                                                        </group>
63                                                                                 </group>
64                                                                                 <newline/>
65                                                                                                         <group  attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'), ('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
66                                                                                     <separator string="Comment Field" colspan="4"/>
67                                                                                     <group colspan="4">
68                                                                                                                         <field name="is_comment_require"/>
69                                                                                                                 </group>
70                                                                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
71                                                                                             <group col="4" colspan="4">
72                                                                                                     <field name="comment_field_type" colspan="1"/>
73                                                                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
74                                                                                                         <field colspan="2" name="comment_label" />
75                                                                                                     </group>
76                                                                                                                         </group>
77                                                                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
78                                                                                                 <field name="comment_valid_type" colspan="2"/>
79                                                                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
80                                                                                                     <field name="comment_minimum_no" string="Between"/>
81                                                                                                     <field name="comment_maximum_no" string="and"/>
82                                                                                                 </group>
83                                                                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
84                                                                                                     <field name="comment_minimum_float" string="Between"/>
85                                                                                                     <field name="comment_maximum_float" string="and"/>
86                                                                                                 </group>
87                                                                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
88                                                                                                     <field name="comment_minimum_date" string="Between"/>
89                                                                                                     <field name="comment_maximum_date" string="and"/>
90                                                                                                 </group>
91                                                                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'),('comment_valid_type','!=','must_be_decimal_number'),('comment_valid_type','!=','must_be_whole_number'),('comment_valid_type','!=','must_be_date'),('comment_valid_type','!=','must_be_email_address')]}">
92                                                                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
93                                                                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
94                                                                                                 </group>
95                                                                                             </group>
96                                                                                                                 </group>
97                                                                                 </group>
98                                                                                 <newline/>
99                                                                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
100                                                                                     <field name="comment_column"/>
101                                                                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
102                                                                                         <field name="column_name" colspan="2"/>
103                                                                                     </group>
104                                                                                                         </group>
105                                                                                 <newline/>
106                                                                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
107                                                                                     <separator string="Validation" colspan="4"/>
108                                                                                     <group colspan="4">
109                                                                                                                         <field name="is_validation_require"/>
110                                                                                                                 </group>
111                                                                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
112                                                                                         <field name="validation_type" colspan="2"/>
113                                                                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
114                                                                                             <field name="validation_minimum_no" string="Between"/>
115                                                                                             <field name="validation_maximum_no" string="and"/>
116                                                                                         </group>
117                                                                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
118                                                                                             <field name="validation_minimum_float" string="Between"/>
119                                                                                             <field name="validation_maximum_float" string="and"/>
120                                                                                         </group>
121                                                                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
122                                                                                             <field name="validation_minimum_date" string="Between"/>
123                                                                                             <field name="validation_maximum_date" string="and"/>
124                                                                                         </group>
125                                                                                     </group>
126                                                                                     <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'),('validation_type','!=','must_be_decimal_number'),('validation_type','!=','must_be_whole_number'),('validation_type','!=','must_be_date'),('validation_type','!=','must_be_email_address')]}">
127                                                                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
128                                                                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
129                                                                                     </group>
130                                                                                 </group>
131                                                                                 <newline/>
132                                                                                 <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','single_textbox'),('type','!=','comment')]}">
133                                                                                     <separator string="Required Answer" colspan="4"/>
134                                                                                     <newline/>
135                                                                                 <field name="is_require_answer"/>
136                                                                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
137                                                                                             <group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time')]}">
138                                                                                                 <field name="required_type"/>
139                                                                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
140                                                                                                     <field name="req_ans" />
141                                                                                                 </group>
142                                                                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
143                                                                                                     <field name="minimum_req_ans"/>
144                                                                                                     <field name="maximum_req_ans"/>
145                                                                                                 </group>
146                                                                                             </group>
147                                                                                             <group colspan="4" attrs="{'invisible':[('required_type','!=','all'),('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly'),('required_type','!=','a range'),('is_require_answer','!=',True)]}">
148                                                                                                 <label string="When the question is not answered, display this error message:"/>
149                                                                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
150                                                                                             </group>
151                                                                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
152                                                                                                 <group colspan="2" >
153                                                                                                     <field name="numeric_required_sum"/>
154                                                                                                 </group>
155                                                                                                 <newline/>
156                                                                                                 <label string="When the choices do not add up correctly, display this error message"/>
157                                                                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
158                                                                                             </group>
159                                                                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
160                                                                                                 <field name="rating_allow_one_column_require"/>
161                                                                                             </group>
162                                                                                                                 </group>
163                                                                                 </group>
164                                                                                 <newline/>
165                                                                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
166                                                                                     <separator string="Descriptive Text" colspan="4"/>
167                                                                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
168                                                                                 </group>
169                                                                         </page>
170                                                                     </notebook>
171                                         </form>
172                                         <tree string="Survey Question">
173                                             <field name="sequence" string="Seq"/>
174                                             <field name="question" colspan="4" select="1"/>
175                                             <field name="answer_choice_ids"/>
176                                         </tree>
177                                     </field>
178                                 </form>
179                             </field>
180                             <group col="9" colspan="4">
181                                 <field name="state"/>
182                                 <button name="survey_draft"
183                                     string="Set to draft" states="cancel,close" type="object"
184                                     icon="gtk-new"/>
185                                 <button name="survey_open" string="Open"
186                                     states="draft" type="object" icon="gtk-go-forward"/>
187                                 <button name="survey_close"
188                                     string="Close" states="open" type="object" icon="gtk-close"/>
189                                 <button name="survey_cancel"
190                                     string="Cancel" states="open" type="object" icon="gtk-cancel"/>
191                             </group>
192                         </page>
193                         <page string="Other">
194                                 <group colspan="6" col='4'>
195                                     <field name="max_response_limit" select="1"
196                                         attrs="{'readonly':[('state','in',('open','close'))]}"/>
197                                     <field name="response_user" select="2"
198                                         attrs="{'readonly':[('state','in',('open','close'))]}"/>
199                                                                 <field name="type"/>
200                                     <field name="send_response"/>
201                                                         </group>
202                             <separator colspan="4" string="Survey Details"/>
203                             <field name="note" colspan="4" nolabel="1"/>
204                         </page>
205                         <page string="History">
206                             <field name="date_open" select="1"/>
207                             <field name="date_close" select="2"/>
208                             <field name="tot_start_survey" select="1"/>
209                             <field name="tot_comp_survey" select="1"/>
210                             <field name="history" colspan="4" nolabel="1">
211                                 <tree string="History">
212                                     <field name="user_id"/>
213                                     <field name="date"/>
214                                 </tree>
215                                 <form string="History">
216                                     <field name="user_id"/>
217                                     <field name="date"/>
218                                 </form>
219                                </field>
220                            </page>
221                     </notebook>
222                 </form>
223             </field>
224         </record>
225
226         <record model ="ir.ui.view" id= "survey_tree">
227             <field name="name">survey_tree</field>
228             <field name="model">survey</field>
229             <field name="type">tree</field>
230             <field name="arch" type="xml">
231                 <tree string="Survey">
232                     <field name="title" select="1"/>
233                     <field name="type" select="1"/>
234                     <field name="date_open" select="1" string="Open Date"/>
235                                         <field name="responsible_id" select="2"/>
236                     <field name="tot_start_survey" select="2" string="Started"/>
237                     <field name="tot_comp_survey" select="2" string="Completed"/>
238                     <field name="state" select="1"/>
239                                         <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
240                                         string="Test Survey" type="action" icon="gtk-execute" context="{'active':True,'survey_id': active_id}"/>
241                                         <button name="%(action_view_survey_name)d" states="open,draft,close,cancel"
242                                         string="Answer Survey" type="action" icon="gtk-new" context="{'survey_id': active_id}"/>
243                                         <button name="%(wizard_print_survey)d" states="open,draft,close,cancel"
244                                         string="Print Survey" type="action" icon="gtk-print" context="{'active':True,'survey_id': active_id}"/>
245                                         <button name="%(survey_browse_response)d" states="open,draft,close,cancel"
246                                         string="Print Answer" type="action" icon="gtk-print"/>
247                 </tree>
248             </field>
249         </record>
250
251        <record id="survey_search" model="ir.ui.view">
252             <field name="name">survey_search</field>
253             <field name="model">survey</field>
254             <field name="type">search</field>
255             <field name="arch" type="xml">
256                 <search string="Search Survey">
257                    <group col='10' colspan='4'>
258                         <filter icon="terp-crm" string="Draft" domain="[('state','=','draft')]"/>
259                         <separator orientation="vertical"/>
260                         <filter string="Open" icon="terp-stock" domain="[('state','=','open')]"/>
261                         <separator orientation="vertical"/>
262                         <field name="title" select="1"/>
263                         <field name="type" select="1"/>
264                         <field name="responsible_id" select="1" widget="selection">
265                         <filter string="MY" icon="terp-partner" domain="[('responsible_id','=',uid)]"/>
266                         </field>
267                    </group>
268                </search>
269             </field>
270         </record>
271
272         <record model="ir.actions.act_window" id="action_survey_form1">
273             <field name="name">Surveys</field>
274             <field name="res_model">survey</field>
275             <field name="view_type">form</field>
276             <field name="view_mode">tree,form</field>
277             <field name="view_id" ref="survey_tree"></field>
278             <field name="search_view_id" ref="survey_search"/>
279         </record>
280
281
282         <menuitem name="Surveys" id="menu_survey_form"
283             action="action_survey_form1" parent="menu_defination"
284             groups="group_survey_manager"/>
285
286         <!--
287             Survey Pages
288         -->
289
290         <record model="ir.ui.view" id="survey_page_form">
291             <field name="name">survey_page_form</field>
292             <field name="model">survey.page</field>
293             <field name="type">form</field>
294             <field name="arch" type="xml">
295                 <form string="Survey Page">
296                     <field name="title" colspan="4" select="1"/>
297                     <field name="survey_id" select="1"/>
298                     <field name="sequence"/>
299                     <separator string="Description" colspan="4"/>
300                     <field name="note" colspan="4" nolabel="1"/>
301                     <field name="question_ids" colspan="4" nolabel="1" context="{'line_order': question_ids}">
302                     <form string="Survey Question">
303                         <field name="question" colspan="4" select="1"/>
304                         <field name="sequence"/>
305                         <field name="tot_resp" select="2"/>
306                         <field name="type" on_change="on_change_type(type)"/>
307                             <field name="in_visible_rating_weight" invisible="1"/>
308                             <field name="in_visible_menu_choice" invisible="1"/>
309                             <notebook colspan="4">
310                                 <page string="Options">
311                                                                 <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','table')]}">
312                                           <separator string="Answer" colspan="4"/>
313                                                                    <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
314                                                    <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}"/>
315                                                </group>
316                                                <group colspan="4" attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','table')]}">
317                                                    <field name="column_heading_ids" colspan="4" nolabel="1" default_get="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
318                                                                                 <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
319                                                                                    <field name="no_of_rows"/>
320                                                                                 </group>
321                                                </group>
322                                         </group>
323                                         <newline/>
324                                                                 <group  attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'), ('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
325                                             <separator string="Comment Field" colspan="4"/>
326                                             <group colspan="4">
327                                                                                 <field name="is_comment_require"/>
328                                                                         </group>
329                                             <group attrs="{'invisible':[('is_comment_require','=',False)]}">
330                                                     <group col="4" colspan="4">
331                                                             <field name="comment_field_type" colspan="1"/>
332                                                             <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
333                                                                 <field colspan="2" name="comment_label" />
334                                                             </group>
335                                                                                 </group>
336                                                     <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
337                                                         <field name="comment_valid_type" colspan="2"/>
338                                                         <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
339                                                             <field name="comment_minimum_no" string="Between"/>
340                                                             <field name="comment_maximum_no" string="and"/>
341                                                         </group>
342                                                         <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
343                                                             <field name="comment_minimum_float" string="Between"/>
344                                                             <field name="comment_maximum_float" string="and"/>
345                                                         </group>
346                                                         <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
347                                                             <field name="comment_minimum_date" string="Between"/>
348                                                             <field name="comment_maximum_date" string="and"/>
349                                                         </group>
350                                                         <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'),('comment_valid_type','!=','must_be_decimal_number'),('comment_valid_type','!=','must_be_whole_number'),('comment_valid_type','!=','must_be_date'),('comment_valid_type','!=','must_be_email_address')]}">
351                                                             <label string="When the comment is an invalid format, display this error message" colspan="4"/>
352                                                             <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
353                                                         </group>
354                                                     </group>
355                                                                         </group>
356                                         </group>
357                                         <newline/>
358                                     <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
359                                             <field name="comment_column"/>
360                                             <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
361                                                 <field name="column_name" colspan="2"/>
362                                             </group>
363                                                                 </group>
364                                         <newline/>
365                                         <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
366                                             <separator string="Validation" colspan="4"/>
367                                             <group colspan="4">
368                                                                                 <field name="is_validation_require"/>
369                                                                         </group>
370                                             <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
371                                                 <field name="validation_type" colspan="2"/>
372                                                 <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
373                                                     <field name="validation_minimum_no" string="Between"/>
374                                                     <field name="validation_maximum_no" string="and"/>
375                                                 </group>
376                                                 <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
377                                                     <field name="validation_minimum_float" string="Between"/>
378                                                     <field name="validation_maximum_float" string="and"/>
379                                                 </group>
380                                                 <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
381                                                     <field name="validation_minimum_date" string="Between"/>
382                                                     <field name="validation_maximum_date" string="and"/>
383                                                 </group>
384                                             </group>
385                                             <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'),('validation_type','!=','must_be_decimal_number'),('validation_type','!=','must_be_whole_number'),('validation_type','!=','must_be_date'),('validation_type','!=','must_be_email_address')]}">
386                                                 <label string="When the comment is an invalid format, display this error message" colspan="4"/>
387                                                 <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
388                                             </group>
389                                         </group>
390                                         <newline/>
391                                         <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','single_textbox'),('type','!=','comment')]}">
392                                             <separator string="Required Answer" colspan="4"/>
393                                             <newline/>
394                                         <field name="is_require_answer"/>
395                                                                         <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
396                                                     <group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time')]}">
397                                                         <field name="required_type"/>
398                                                         <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
399                                                             <field name="req_ans" />
400                                                         </group>
401                                                         <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
402                                                             <field name="minimum_req_ans"/>
403                                                             <field name="maximum_req_ans"/>
404                                                         </group>
405                                                     </group>
406                                                     <group colspan="4" attrs="{'invisible':[('required_type','!=','all'),('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly'),('required_type','!=','a range'),('is_require_answer','!=',True)]}">
407                                                         <label string="When the question is not answered, display this error message:"/>
408                                                         <field name="req_error_msg" colspan="4" nolabel="1"/>
409                                                     </group>
410                                                     <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
411                                                         <group colspan="2" >
412                                                             <field name="numeric_required_sum"/>
413                                                         </group>
414                                                         <newline/>
415                                                         <label string="When the choices do not add up correctly, display this error message"/>
416                                                         <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
417                                                     </group>
418                                                     <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
419                                                         <field name="rating_allow_one_column_require"/>
420                                                     </group>
421                                                                         </group>
422                                         </group>
423                                         <newline/>
424                                         <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
425                                             <separator string="Descriptive Text" colspan="4"/>
426                                             <field name="descriptive_text" colspan="4" nolabel="1"/>
427                                         </group>
428                                 </page>
429                             </notebook>
430                     </form>
431                     <tree string="Survey Question">
432                         <field name="sequence" string="Seq"/>
433                         <field name="question" colspan="4" select="1"/>
434                         <field name="answer_choice_ids"/>
435                     </tree>
436                     </field>
437                 </form>
438             </field>
439         </record>
440
441
442         <record model="ir.ui.view" id="survey_page_tree">
443             <field name="name">survey_page_tree</field>
444             <field name="model">survey.page</field>
445             <field name="type">tree</field>
446             <field name="arch" type="xml">
447                 <tree string="Survey Page">
448                     <field name="sequence" string="Seq"/>
449                     <field name="title"/>
450                     <field name="survey_id"/>
451                     <field name="question_ids" string="#Questions"/>
452                 </tree>
453             </field>
454         </record>
455
456         <record model="ir.actions.act_window" id="action_survey_page_form">
457             <field name="name">Survey Pages</field>
458             <field name="res_model">survey.page</field>
459             <field name="view_type">form</field>
460             <field name="view_mode">tree,form</field>
461             <field name="view_id" ref="survey_page_tree"></field>
462         </record>
463
464         <menuitem name="Survey Pages" id="menu_survey_page_form1"
465             action="action_survey_page_form" parent='menu_defination'
466             groups="group_survey_manager"/>
467
468         <record model="ir.ui.view" id="survey_page_wizard_test1">
469             <field name="name">survey_page_wizard_test</field>
470             <field name="model">survey.page</field>
471             <field name="type">form</field>
472             <field name="arch" type="xml">
473                 <form string="Survey Pages">
474                     <field name="title" colspan="4" select="1"/>
475                     <field name="sequence"/>
476                     <separator string="Description" colspan="4"/>
477                     <field name="note" colspan="4" nolabel="1"/>
478                         <group colspan="4">
479                                 <label string="" colspan="3"/>
480                                                 <button name="survey_save"  string="Ok" type="object" icon="gtk-go-back"/>
481                                         </group>
482                                 </form>
483                         </field>
484                 </record>
485
486         <!--
487             Survey Question
488         -->
489
490         <record model="ir.ui.view" id="survey_question_form">
491             <field name="name">survey_question_form</field>
492             <field name="model">survey.question</field>
493             <field name="type">form</field>
494             <field name="arch" type="xml">
495                 <form string="Survey Question">
496                     <field name="question" colspan="4" select="1"/>
497                     <field name="page_id" select="1"/>
498                     <field name="sequence"/>
499                     <field name="tot_resp" select="2"/>
500                     <field name="type" on_change="on_change_type(type)"/>
501                     <field name="in_visible_rating_weight" invisible="1"/>
502                     <field name="in_visible_menu_choice" invisible="1"/>
503                     <notebook colspan="4">
504                         <page string="Options">
505                                                         <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','table')]}">
506                                   <separator string="Answer" colspan="4"/>
507                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
508                                            <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}"/>
509                                        </group>
510                                        <group colspan="4" attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','table')]}">
511                                            <field name="column_heading_ids" colspan="4" nolabel="1" default_get="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
512                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
513                                                                            <field name="no_of_rows"/>
514                                                                         </group>
515                                        </group>
516                                 </group>
517                                 <newline/>
518                                                         <group  attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'), ('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
519                                     <separator string="Comment Field" colspan="4"/>
520                                     <group colspan="4">
521                                                                         <field name="is_comment_require"/>
522                                                                 </group>
523                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
524                                             <group col="4" colspan="4">
525                                                     <field name="comment_field_type" colspan="1"/>
526                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
527                                                         <field colspan="2" name="comment_label" />
528                                                     </group>
529                                                                         </group>
530                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
531                                                 <field name="comment_valid_type" colspan="2"/>
532                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
533                                                     <field name="comment_minimum_no" string="Between"/>
534                                                     <field name="comment_maximum_no" string="and"/>
535                                                 </group>
536                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
537                                                     <field name="comment_minimum_float" string="Between"/>
538                                                     <field name="comment_maximum_float" string="and"/>
539                                                 </group>
540                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
541                                                     <field name="comment_minimum_date" string="Between"/>
542                                                     <field name="comment_maximum_date" string="and"/>
543                                                 </group>
544                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'),('comment_valid_type','!=','must_be_decimal_number'),('comment_valid_type','!=','must_be_whole_number'),('comment_valid_type','!=','must_be_date'),('comment_valid_type','!=','must_be_email_address')]}">
545                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
546                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
547                                                 </group>
548                                             </group>
549                                                                 </group>
550                                 </group>
551                                 <newline/>
552                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
553                                     <field name="comment_column"/>
554                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
555                                         <field name="column_name" colspan="2"/>
556                                     </group>
557                                                         </group>
558                                 <newline/>
559                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
560                                     <separator string="Validation" colspan="4"/>
561                                     <group colspan="4">
562                                                                         <field name="is_validation_require"/>
563                                                                 </group>
564                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
565                                         <field name="validation_type" colspan="2"/>
566                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
567                                             <field name="validation_minimum_no" string="Between"/>
568                                             <field name="validation_maximum_no" string="and"/>
569                                         </group>
570                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
571                                             <field name="validation_minimum_float" string="Between"/>
572                                             <field name="validation_maximum_float" string="and"/>
573                                         </group>
574                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
575                                             <field name="validation_minimum_date" string="Between"/>
576                                             <field name="validation_maximum_date" string="and"/>
577                                         </group>
578                                     </group>
579                                     <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'),('validation_type','!=','must_be_decimal_number'),('validation_type','!=','must_be_whole_number'),('validation_type','!=','must_be_date'),('validation_type','!=','must_be_email_address')]}">
580                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
581                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
582                                     </group>
583                                 </group>
584                                 <newline/>
585                                 <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','single_textbox'),('type','!=','comment')]}">
586                                     <separator string="Required Answer" colspan="4"/>
587                                     <newline/>
588                                 <field name="is_require_answer"/>
589                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
590                                             <group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time')]}">
591                                                 <field name="required_type"/>
592                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
593                                                     <field name="req_ans" />
594                                                 </group>
595                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
596                                                     <field name="minimum_req_ans"/>
597                                                     <field name="maximum_req_ans"/>
598                                                 </group>
599                                             </group>
600                                             <group colspan="4" attrs="{'invisible':[('required_type','!=','all'),('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly'),('required_type','!=','a range'),('is_require_answer','!=',True)]}">
601                                                 <label string="When the question is not answered, display this error message:"/>
602                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
603                                             </group>
604                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
605                                                 <group colspan="2" >
606                                                     <field name="numeric_required_sum"/>
607                                                 </group>
608                                                 <newline/>
609                                                 <label string="When the choices do not add up correctly, display this error message"/>
610                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
611                                             </group>
612                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
613                                                 <field name="rating_allow_one_column_require"/>
614                                             </group>
615                                                                 </group>
616                                 </group>
617                                 <newline/>
618                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
619                                     <separator string="Descriptive Text" colspan="4"/>
620                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
621                                 </group>
622                         </page>
623                     </notebook>
624                 </form>
625             </field>
626         </record>
627
628         <record model="ir.ui.view" id="survey_question_tree">
629             <field name="name">survey_question_tree</field>
630             <field name="model">survey.question</field>
631             <field name="type">tree</field>
632             <field name="arch" type="xml">
633                 <tree string="Survey Question">
634                                         <field name="sequence" string="Seq"/>
635                     <field name="question" colspan="4" select="1"/>
636                     <field name="page_id" select="1"/>
637                     <field name="survey" select="1"/>
638                     <field name="type" select="2" />
639                 </tree>
640             </field>
641         </record>
642
643         <record model="ir.actions.act_window" id="action_survey_question_form">
644             <field name="name">Survey Questions</field>
645             <field name="res_model">survey.question</field>
646             <field name="view_type">form</field>
647             <field name="view_mode">tree,form</field>
648             <field name="view_id" ref="survey_question_tree"></field>
649         </record>
650
651         <menuitem name="Survey Question" id="menu_survey_question_form1"
652             action="action_survey_question_form" parent='menu_defination'
653             groups="group_survey_manager"/>
654
655
656         <record model="ir.ui.view" id="survey_question_wizard_test">
657             <field name="name">survey_question_wizard_test</field>
658             <field name="model">survey.question</field>
659             <field name="type">form</field>
660             <field name="arch" type="xml">
661                 <form string="Survey Question">
662                     <field name="question" colspan="4" select="1"/>
663                     <field name="sequence"/>
664                     <field name="tot_resp" select="2"/>
665                     <field name="type" on_change="on_change_type(type)"/>
666                     <field name="in_visible_rating_weight" invisible="1"/>
667                     <field name="in_visible_menu_choice" invisible="1"/>
668                     <notebook colspan="4">
669                         <page string="Options">
670                                                         <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','table')]}">
671                                   <separator string="Answer" colspan="4"/>
672                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
673                                            <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}"/>
674                                        </group>
675                                        <group colspan="4" attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','table')]}">
676                                            <field name="column_heading_ids" colspan="4" nolabel="1" default_get="{'in_visible_rating_weight':in_visible_rating_weight,'in_visible_menu_choice':in_visible_menu_choice}"/>
677                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
678                                                                            <field name="no_of_rows"/>
679                                                                         </group>
680                                        </group>
681                                 </group>
682                                 <newline/>
683                                                         <group  attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'), ('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
684                                     <separator string="Comment Field" colspan="4"/>
685                                     <group colspan="4">
686                                                                         <field name="is_comment_require"/>
687                                                                 </group>
688                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
689                                             <group col="4" colspan="4">
690                                                     <field name="comment_field_type" colspan="1"/>
691                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
692                                                         <field colspan="2" name="comment_label" />
693                                                     </group>
694                                                                         </group>
695                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
696                                                 <field name="comment_valid_type" colspan="2"/>
697                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
698                                                     <field name="comment_minimum_no" string="Between"/>
699                                                     <field name="comment_maximum_no" string="and"/>
700                                                 </group>
701                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
702                                                     <field name="comment_minimum_float" string="Between"/>
703                                                     <field name="comment_maximum_float" string="and"/>
704                                                 </group>
705                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
706                                                     <field name="comment_minimum_date" string="Between"/>
707                                                     <field name="comment_maximum_date" string="and"/>
708                                                 </group>
709                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'),('comment_valid_type','!=','must_be_decimal_number'),('comment_valid_type','!=','must_be_whole_number'),('comment_valid_type','!=','must_be_date'),('comment_valid_type','!=','must_be_email_address')]}">
710                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
711                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
712                                                 </group>
713                                             </group>
714                                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale')]}">
715                                                     <field name="comment_column"/>
716                                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
717                                                         <field name="column_name" colspan="2"/>
718                                                     </group>
719                                                                         </group>
720                                                                 </group>
721                                 </group>
722                                 <newline/>
723                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
724                                     <separator string="Validation" colspan="4"/>
725                                     <group colspan="4">
726                                                                         <field name="is_validation_require"/>
727                                                                 </group>
728                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
729                                         <field name="validation_type" colspan="2"/>
730                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
731                                             <field name="validation_minimum_no" string="Between"/>
732                                             <field name="validation_maximum_no" string="and"/>
733                                         </group>
734                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
735                                             <field name="validation_minimum_float" string="Between"/>
736                                             <field name="validation_maximum_float" string="and"/>
737                                         </group>
738                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
739                                             <field name="validation_minimum_date" string="Between"/>
740                                             <field name="validation_maximum_date" string="and"/>
741                                         </group>
742                                     </group>
743                                     <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'),('validation_type','!=','must_be_decimal_number'),('validation_type','!=','must_be_whole_number'),('validation_type','!=','must_be_date'),('validation_type','!=','must_be_email_address')]}">
744                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
745                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
746                                     </group>
747                                 </group>
748                                 <newline/>
749                                 <group attrs="{'invisible':[('type','!=','multiple_choice_only_one_ans'), ('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time'),('type','!=','single_textbox'),('type','!=','comment')]}">
750                                     <separator string="Required Answer" colspan="4"/>
751                                     <newline/>
752                                 <field name="is_require_answer"/>
753                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
754                                             <group colspan="4" attrs="{'invisible':[('type','!=','multiple_choice_multiple_ans'),('type','!=','matrix_of_choices_only_one_ans'),('type','!=','matrix_of_choices_only_multi_ans'),('type','!=','matrix_of_drop_down_menus'),('type','!=','rating_scale'),('type','!=','multiple_textboxes'),('type','!=','numerical_textboxes'),('type','!=','date'),('type','!=','date_and_time')]}">
755                                                 <field name="required_type"/>
756                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
757                                                     <field name="req_ans" />
758                                                 </group>
759                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
760                                                     <field name="minimum_req_ans"/>
761                                                     <field name="maximum_req_ans"/>
762                                                 </group>
763                                             </group>
764                                             <group colspan="4" attrs="{'invisible':[('required_type','!=','all'),('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly'),('required_type','!=','a range'),('is_require_answer','!=',True)]}">
765                                                 <label string="When the question is not answered, display this error message:"/>
766                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
767                                             </group>
768                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
769                                                 <group colspan="2" >
770                                                     <field name="numeric_required_sum"/>
771                                                 </group>
772                                                 <newline/>
773                                                 <label string="When the choices do not add up correctly, display this error message"/>
774                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
775                                             </group>
776                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
777                                                 <field name="rating_allow_one_column_require"/>
778                                             </group>
779                                                                 </group>
780                                 </group>
781                                 <newline/>
782                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
783                                     <separator string="Descriptive Text" colspan="4"/>
784                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
785                                 </group>
786                         </page>
787                     </notebook>
788                         <group colspan="4">
789                                 <label string="" colspan="3"/>
790                                                 <button name="survey_save"  string="Ok" type="object" icon="gtk-ok"/>
791                                         </group>
792                 </form>
793             </field>
794         </record>
795
796         <!--
797             Survey Answer
798         -->
799
800         <record model ="ir.ui.view" id="survey_answer_form">
801             <field name="name">survey_answer_form</field>
802             <field name="model">survey.answer</field>
803             <field name="type">form</field>
804             <field name="arch" type="xml">
805                 <form string="Survey Answer">
806                     <field name="answer" colspan="4" select="1"/>
807                     <field name="sequence"/>
808                 </form>
809             </field>
810         </record>
811
812
813         <record model="ir.ui.view" id= "survey_answer_tree">
814             <field name="name">survey_answer_tree</field>
815             <field name="model">survey.answer</field>
816             <field name="type">tree</field>
817             <field name="arch" type="xml">
818                 <tree editable="bottom" string="Survey Answer">
819                     <field name="sequence" string="Seq"/>
820                     <field name="answer" select="1"/>
821                 </tree>
822             </field>
823         </record>
824
825         <!--
826             Survey Response Line
827         -->
828
829         <record model ="ir.ui.view" id= "survey_response_line_form">
830             <field name="name">survey_response_line_form</field>
831             <field name="model">survey.response.line</field>
832             <field name="type">form</field>
833             <field name="arch" type="xml">
834                 <form string="Survey Response">
835                         <field name="question_id"/>
836                     <field name="date_create" select="1"/>
837                     <notebook colspan="4">
838                         <page string="Response">
839                             <field name="response_answer_ids" colspan="4" nolabel="1"/>
840                             <group col="5" colspan="4">
841                                 <field name="state"/>
842                                 <button name="response_draft"
843                                     string="Set to draft" states="done,skip" type="object"
844                                     icon="gtk-new"/>
845                                 <button name="response_done" string="Done"
846                                     states="draft" type="object" icon="gtk-go-forward"/>
847                                 <button name="response_skip" string="Skip"
848                                     states="draft" type="object" icon="gtk-close"/>
849                             </group>
850                         </page>
851                         <page string="Single Textboxes">
852                             <field name="single_text" colspan="4"/>
853                         </page>
854                         <page string="Comment">
855                             <separator string="Description" colspan="4"/>
856                             <field name="comment" nolabel="1" colspan="4"/>
857                         </page>
858                         <page string="Table Answer">
859                             <field name="response_table_ids" colspan="4" nolabel="1">
860                             <form string="Table">
861                                 <field name="column_id"/>
862                                 <field name="name"/>
863                                 <field name="value"/>
864                             </form>
865                             <tree string="Table">
866                                 <field name="column_id"/>
867                                 <field name="name"/>
868                                 <field name="value"/>
869                             </tree>
870                             </field>
871                         </page>
872                     </notebook>
873                 </form>
874             </field>
875         </record>
876
877         <record model="ir.ui.view" id="survey_response_line_tree">
878             <field name="name">survey_response_line_tree</field>
879             <field name="model">survey.response.line</field>
880             <field name="type">tree</field>
881             <field name="arch" type="xml">
882                 <tree string="Survey Response Line">
883                         <field name="page_id"/>
884                     <field name="question_id"/>
885                     <field name="date_create" select="1"/>
886                     <field name="state"/>
887                 </tree>
888             </field>
889         </record>
890
891         <!--
892             Survey Response
893         -->
894
895         <record model="ir.ui.view" id="survey_response_form">
896             <field name="name">survey_response_form</field>
897             <field name="model">survey.response</field>
898             <field name="type">form</field>
899             <field name="arch" type="xml">
900                 <form string="Survey Response Answer">
901                                         <field name="survey_id" select="1"/>
902                     <field name="date_create" select="1"/>
903                     <field name="user_id" select="1"/>
904                     <field name="response_type" select="1"/>
905                     <field name="question_ids" nolabel="1" colspan="4" />
906                     <group col="5" colspan="4">
907                         <field name="state"/>
908                         <button name="response_done" string="Done"
909                             states="skip" type="object" icon="gtk-go-forward"/>
910                         <button name="response_skip" string="Skip"
911                             states="done" type="object" icon="gtk-close"/>
912                     </group>
913                 </form>
914             </field>
915         </record>
916
917         <record model="ir.ui.view" id="survey_response_tree">
918             <field name="name">survey_response_tree</field>
919             <field name="model">survey.response</field>
920             <field name="type">tree</field>
921             <field name="arch" type="xml">
922                 <tree string="Survey Response Answer">
923                         <field name="survey_id" select="1"/>
924                     <field name="date_create" select="1"/>
925                     <field name="user_id" select="1"/>
926                     <field name="response_type" select="1"/>
927                 </tree>
928             </field>
929         </record>
930
931         <!--
932             Survey Response Answer
933         -->
934
935         <record model="ir.ui.view" id="survey_response_answer_form">
936             <field name="name">survey_response_answer_form</field>
937             <field name="model">survey.response.answer</field>
938             <field name="type">form</field>
939             <field name="arch" type="xml">
940                 <form string="Survey Response Answer">
941                     <group colspan="4">
942                         <field name="answer_id"/>
943                         <field name="answer" />
944                     </group>
945                     <field name="value_choice"/>
946                     <label string="(Use Only Question Type is matrix_of_drop_down_menus)" align="0.0"/>
947                     <field name="comment_field"/>
948                 </form>
949             </field>
950         </record>
951
952         <record model="ir.ui.view" id="survey_response_answer_tree">
953             <field name="name">survey_response_answer_tree</field>
954             <field name="model">survey.response.answer</field>
955             <field name="type">tree</field>
956             <field name="arch" type="xml">
957                 <tree editable="top" string="Survey Response Answer">
958                     <field name="answer_id"/>
959                     <field name="answer" />
960                     <field name="value_choice" />
961                     <field name="comment_field"/>
962                 </tree>
963             </field>
964         </record>
965
966         <!--
967             Survey Question Column Heading
968     -->
969
970         <record model="ir.ui.view" id="survey_question_column_heading_form">
971             <field name="name">survey_question_column_heading_form</field>
972             <field name="model">survey.question.column.heading</field>
973             <field name="type">form</field>
974             <field name="arch" type="xml">
975                 <form string="Column Heading">
976                     <field name="title"/>
977                     <field name="in_visible_rating_weight" invisible="1"/>
978                     <field name="in_visible_menu_choice" invisible="1"/>
979                     <group colspan="4" attrs="{'invisible':[('in_visible_rating_weight','!=',False)]}">
980                         <field name="rating_weight"/>
981                         <label align="0.0" string="Use if question type is rating_scale" />
982                     </group>
983                     <group colspan="4" attrs="{'invisible':[('in_visible_menu_choice','!=',False)]}">
984                         <separator string="Menu Choices (each choice on separate lines)" colspan="4"/>
985                         <field name="menu_choice" nolabel="1" colspan="4"/>
986                     </group>
987                 </form>
988             </field>
989         </record>
990
991         <record model="ir.ui.view" id="survey_question_column_heading_tree">
992             <field name="name">survey_question_column_heading_tree</field>
993             <field name="model">survey.question.column.heading</field>
994             <field name="type">tree</field>
995             <field name="arch" type="xml">
996                 <tree editable="bottom" string="Column Heading">
997                     <field name="title"/>
998                 </tree>
999             </field>
1000         </record>
1001
1002         <!--
1003             Survey Request
1004         -->
1005
1006         <record model="ir.ui.view" id="survey_request_form">
1007             <field name="name">survey_request_form</field>
1008             <field name="model">survey.request</field>
1009             <field name="type">form</field>
1010             <field name="arch" type="xml">
1011                 <form string="Survey Request">
1012                     <field name="date_deadline"/>
1013                     <field name="survey_id" widget="selection"/>
1014                     <field name="user_id" on_change="on_change_user(user_id)"/>
1015                     <field name="email"/>
1016                                         <field name="answer_ids" nolabel="1" colspan="4"/>
1017                     <group colspan="4" col="5">
1018                         <field name="state"/>
1019                         <button name="survey_req_waiting_answer" string="Set to Watting Answer" states="cancel,done" type="object" icon="gtk-new"/>
1020                         <button name="survey_req_done" string="Done" states="waiting_answer" type="object" icon="gtk-ok"/>
1021                         <button name="survey_req_cancel" string="Cancelled" states="waiting_answer" type="object" icon="gtk-cancel"/>
1022                     </group>
1023                 </form>
1024             </field>
1025         </record>
1026
1027         <record model="ir.ui.view" id="survey_request_tree">
1028             <field name="name">survey_request_tree</field>
1029             <field name="model">survey.request</field>
1030             <field name="type">tree</field>
1031             <field name="arch" type="xml">
1032                 <tree string="Survey Request">
1033                     <field name="date_deadline"/>
1034                     <field name="survey_id" widget="selection"/>
1035                     <field name="email" />
1036                     <field name="state" />
1037                 </tree>
1038             </field>
1039         </record>
1040
1041         <!--
1042             Survey Type
1043         -->
1044
1045         <record model="ir.ui.view" id="survey_type_form">
1046             <field name="name">survey_type_form</field>
1047             <field name="model">survey.type</field>
1048             <field name="type">form</field>
1049             <field name="arch" type="xml">
1050                 <form string="Survey Type">
1051                     <field name="name" select="1"/>
1052                     <field name="code" select="1"/>
1053                 </form>
1054             </field>
1055         </record>
1056
1057         <record model="ir.ui.view" id="survey_type_tree">
1058             <field name="name">survey_type_tree</field>
1059             <field name="model">survey.type</field>
1060             <field name="type">tree</field>
1061             <field name="arch" type="xml">
1062                 <tree string="Survey Type">
1063                     <field name="name" select="1"/>
1064                     <field name="code" select="1"/>
1065                 </tree>
1066             </field>
1067         </record>
1068
1069         <record model="ir.actions.act_window" id="action_survey_type_form">
1070             <field name="name">Survey Type</field>
1071             <field name="res_model">survey.type</field>
1072             <field name="view_type">form</field>
1073             <field name="view_mode">tree,form</field>
1074             <field name="view_id" ref="survey_type_tree"></field>
1075         </record>
1076
1077         <menuitem name="Survey Types" id="menu_survey_type_form1"
1078             action="action_survey_type_form" parent='menu_survey_config'
1079             groups="group_survey_manager"/>
1080
1081         <act_window domain="[('survey_id', '=', active_id)]"
1082             id="act_survey_pages"
1083             name="Survey Pages"
1084             res_model="survey.page"
1085             src_model="survey"/>
1086
1087         <act_window domain="[('survey', '=', active_id)]"
1088             id="act_survey_question"
1089             name="All Questions"
1090             res_model="survey.question"
1091             src_model="survey"/>
1092
1093
1094         <act_window domain="[('page_id', '=', active_id)]"
1095             id="act_survey_page_question"
1096             name="Survey Questions"
1097             res_model="survey.question"
1098             src_model="survey.page"/>
1099
1100         <act_window domain="[('question_id', '=', active_id)]"
1101             id="act_survey_answer"
1102             name="Survey Answers"
1103             res_model="survey.answer"
1104             src_model="survey.question"/>
1105
1106         <act_window domain="[('survey_id', '=', active_id)]"
1107             id="act_survey_response"
1108             name="Survey Response"
1109             res_model="survey.response"
1110             src_model="survey"/>
1111
1112                 <menuitem name="Answer a Survey" id="menu_run_survey_form" sequence="2"
1113                         action="action_view_survey_name" parent="main_menu_survey"
1114                         groups="group_survey_manager,group_survey_user" icon="STOCK_INDEX"/>
1115
1116                 <menuitem action="wizard_browse_answer" id="menu_wizard_browse_answer"
1117                         parent="main_menu_survey" type="wizard"/>
1118
1119     </data>
1120 </openerp>