[REF] purchase: search view of purchase order and form view of merge order wizard
[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" sequence="15"/>
7                         <menuitem name="Define Surveys" id="menu_define_survey"
8                                  groups="group_survey_manager"
9                                  parent="base.menu_tools" />
10                         <menuitem id="menu_answer_surveys" name="Answer Surveys" parent="base.menu_tools" groups="group_survey_manager,group_survey_user"/>
11 <!--        <menuitem name="Configuration" id="menu_survey_config" parent="main_menu_survey" groups="group_survey_manager"/>-->
12                         <menuitem name="Reporting" parent="base.menu_tools"
13                                 id="menu_reporting" groups="group_survey_manager"/>
14         <!--
15             Survey
16         -->
17         <record model="ir.ui.view" id="survey_form">
18             <field name="name">survey_form</field>
19             <field name="model">survey</field>
20             <field name="type">form</field>
21             <field name="arch" type="xml">
22                 <form string="Survey">
23                         <field name="title" select="1"/>
24                         <group col="6" colspan="6">
25                             <field name="responsible_id"/>
26                                 <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
27                                 string="Test Survey" type="action" icon="gtk-new"
28                                 context="{'active':True,'survey_id': active_id}"/>
29                                                 <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
30                                 string="Answer Survey" type="action" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
31                                                 <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
32                                 string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
33                                         </group>
34                     <notebook colspan="4">
35                         <page string="Survey">
36                             <field name="page_ids" colspan="4" nolabel="1" mode="form,tree" context="{'line_order': page_ids}">
37                                 <form string="Survey Page">
38                                     <field name="title" select="1"/>
39                                     <field name="sequence"/>
40                                     <field name="note" colspan="4" nolabel="1"/>
41                                     <field name="question_ids" colspan="4" nolabel="1" context="{'line_order': question_ids}">
42                                         <form string="Survey Question">
43                                             <field name="question" colspan="4" select="1"/>
44                                             <field name="sequence"/>
45                                             <field name="tot_resp" select="2"/>
46                                             <field name="type" on_change="on_change_type(type)"/>
47                                                                     <field name="in_visible_rating_weight" invisible="1"/>
48                                                                     <field name="in_visible_menu_choice" invisible="1"/>
49                                                                     <field name="in_visible_answer_type" invisible="1"/>
50                                                                     <notebook colspan="4">
51                                                                         <page string="Options">
52                                                                                                         <group attrs="{'invisible':[('type','!=','multiple_textboxes_diff_type'),('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}" default_get="{'in_visible_answer_type': in_visible_answer_type}"/>
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'),('type','!=','multiple_textboxes_diff_type')]}">
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'),('type','!=','multiple_textboxes_diff_type')]}">
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="date"/>
213                                     <field name="user_id"/>
214                                 </tree>
215                                 <form string="History">
216                                     <field name="date"/>
217                                     <field name="user_id"/>
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_question_message)d" states="open,draft,close,cancel"
240                         string="Test Survey" type="action" icon="gtk-new"
241                         context="{'active':True,'survey_id': active_id}"/>
242                                         <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
243                         string="Answer Survey" type="action" icon="gtk-execute" context="{'survey_id': active_id}" attrs="{'invisible':[('state','!=','open')]}"/>
244                                         <button name="%(action_view_survey_question_message)d" states="open,draft,close,cancel"
245                         string="Edit Survey" type="action" icon="gtk-edit" context="{'active':True,'edit' : True,'survey_id': active_id}"/>
246                                         <button name="%(wizard_print_survey)d" states="open,draft,close,cancel"
247                                         string="Print Survey" type="action" icon="gtk-print" context="{'active':True,'survey_id': active_id}"/>
248                                         <button name="%(survey_browse_response)d" states="open,draft,close,cancel"
249                                         string="Print Answer" type="action" icon="gtk-print"/>
250                 </tree>
251             </field>
252         </record>
253
254        <record id="survey_search" model="ir.ui.view">
255             <field name="name">survey_search</field>
256             <field name="model">survey</field>
257             <field name="type">search</field>
258             <field name="arch" type="xml">
259                 <search string="Search Survey">
260                    <group col='10' colspan='4'>
261                         <filter icon="terp-crm" string="Draft" domain="[('state','=','draft')]"/>
262                         <filter string="Open" icon="terp-stock" domain="[('state','=','open')]"/>
263                         <separator orientation="vertical"/>
264                         <field name="title" select="1"/>
265                         <field name="type" select="1" widget="selection"/>
266                         <field name="responsible_id" select="1" widget="selection" default="1">
267                         <filter string="MY" icon="terp-partner" domain="[('responsible_id','=',uid)]"/>
268                         </field>
269                    </group>
270                </search>
271             </field>
272         </record>
273
274         <record model="ir.actions.act_window" id="action_survey_form1">
275             <field name="name">Surveys</field>
276             <field name="res_model">survey</field>
277             <field name="view_type">form</field>
278             <field name="view_mode">tree,form</field>
279             <field name="view_id" ref="survey_tree"></field>
280             <field name="search_view_id" ref="survey_search"/>
281         </record>
282
283
284         <menuitem name="Surveys" id="menu_survey_form"
285             action="action_survey_form1" parent="menu_define_survey"
286             groups="group_survey_manager"/>
287
288         <!--
289             Survey Pages
290         -->
291
292         <record model="ir.ui.view" id="survey_page_form">
293             <field name="name">survey_page_form</field>
294             <field name="model">survey.page</field>
295             <field name="type">form</field>
296             <field name="arch" type="xml">
297                 <form string="Survey Page">
298                     <field name="title" colspan="4" select="1"/>
299                     <field name="survey_id" select="1"/>
300                     <field name="sequence"/>
301                     <separator string="Description" colspan="4"/>
302                     <field name="note" colspan="4" nolabel="1"/>
303                     <field name="question_ids" colspan="4" nolabel="1" context="{'line_order': question_ids}">
304                     <form string="Survey Question">
305                         <field name="question" colspan="4" select="1"/>
306                         <field name="sequence"/>
307                         <field name="tot_resp" select="2"/>
308                         <field name="type" on_change="on_change_type(type)"/>
309                             <field name="in_visible_rating_weight" invisible="1"/>
310                             <field name="in_visible_menu_choice" invisible="1"/>
311                             <field name="in_visible_answer_type" invisible="1"/>
312                         <notebook colspan="4">
313                                 <page string="Options">
314                                                                 <group attrs="{'invisible':[('type','!=','multiple_textboxes_diff_type'),('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')]}">
315                                           <separator string="Answer" colspan="4"/>
316                                                                    <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
317                                                    <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}" default_get="{'in_visible_answer_type': in_visible_answer_type}"/>
318                                                </group>
319                                                <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')]}">
320                                                    <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}"/>
321                                                                                 <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
322                                                                                    <field name="no_of_rows"/>
323                                                                                 </group>
324                                                </group>
325                                         </group>
326                                         <newline/>
327                                                                 <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')]}">
328                                             <separator string="Comment Field" colspan="4"/>
329                                             <group colspan="4">
330                                                                                 <field name="is_comment_require"/>
331                                                                         </group>
332                                             <group attrs="{'invisible':[('is_comment_require','=',False)]}">
333                                                     <group col="4" colspan="4">
334                                                             <field name="comment_field_type" colspan="1"/>
335                                                             <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
336                                                                 <field colspan="2" name="comment_label" />
337                                                             </group>
338                                                                                 </group>
339                                                     <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
340                                                         <field name="comment_valid_type" colspan="2"/>
341                                                         <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
342                                                             <field name="comment_minimum_no" string="Between"/>
343                                                             <field name="comment_maximum_no" string="and"/>
344                                                         </group>
345                                                         <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
346                                                             <field name="comment_minimum_float" string="Between"/>
347                                                             <field name="comment_maximum_float" string="and"/>
348                                                         </group>
349                                                         <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
350                                                             <field name="comment_minimum_date" string="Between"/>
351                                                             <field name="comment_maximum_date" string="and"/>
352                                                         </group>
353                                                         <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')]}">
354                                                             <label string="When the comment is an invalid format, display this error message" colspan="4"/>
355                                                             <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
356                                                         </group>
357                                                     </group>
358                                                                         </group>
359                                         </group>
360                                         <newline/>
361                                     <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
362                                             <field name="comment_column"/>
363                                             <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
364                                                 <field name="column_name" colspan="2"/>
365                                             </group>
366                                                                 </group>
367                                         <newline/>
368                                         <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
369                                             <separator string="Validation" colspan="4"/>
370                                             <group colspan="4">
371                                                                                 <field name="is_validation_require"/>
372                                                                         </group>
373                                             <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
374                                                 <field name="validation_type" colspan="2"/>
375                                                 <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
376                                                     <field name="validation_minimum_no" string="Between"/>
377                                                     <field name="validation_maximum_no" string="and"/>
378                                                 </group>
379                                                 <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
380                                                     <field name="validation_minimum_float" string="Between"/>
381                                                     <field name="validation_maximum_float" string="and"/>
382                                                 </group>
383                                                 <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
384                                                     <field name="validation_minimum_date" string="Between"/>
385                                                     <field name="validation_maximum_date" string="and"/>
386                                                 </group>
387                                             </group>
388                                             <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')]}">
389                                                 <label string="When the comment is an invalid format, display this error message" colspan="4"/>
390                                                 <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
391                                             </group>
392                                         </group>
393                                         <newline/>
394                                         <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'),('type','!=','multiple_textboxes_diff_type')]}">
395                                             <separator string="Required Answer" colspan="4"/>
396                                             <newline/>
397                                         <field name="is_require_answer"/>
398                                                                         <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
399                                                     <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'),('type','!=','multiple_textboxes_diff_type')]}">
400                                                         <field name="required_type"/>
401                                                         <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
402                                                             <field name="req_ans" />
403                                                         </group>
404                                                         <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
405                                                             <field name="minimum_req_ans"/>
406                                                             <field name="maximum_req_ans"/>
407                                                         </group>
408                                                     </group>
409                                                     <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)]}">
410                                                         <label string="When the question is not answered, display this error message:"/>
411                                                         <field name="req_error_msg" colspan="4" nolabel="1"/>
412                                                     </group>
413                                                     <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
414                                                         <group colspan="2" >
415                                                             <field name="numeric_required_sum"/>
416                                                         </group>
417                                                         <newline/>
418                                                         <label string="When the choices do not add up correctly, display this error message"/>
419                                                         <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
420                                                     </group>
421                                                     <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
422                                                         <field name="rating_allow_one_column_require"/>
423                                                     </group>
424                                                                         </group>
425                                         </group>
426                                         <newline/>
427                                         <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
428                                             <separator string="Descriptive Text" colspan="4"/>
429                                             <field name="descriptive_text" colspan="4" nolabel="1"/>
430                                         </group>
431                                 </page>
432                             </notebook>
433
434                     </form>
435                     <tree string="Survey Question">
436                         <field name="sequence" string="Seq"/>
437                         <field name="question" colspan="4" select="1"/>
438                         <field name="answer_choice_ids"/>
439                     </tree>
440                     </field>
441                 </form>
442             </field>
443         </record>
444
445
446         <record model="ir.ui.view" id="survey_page_tree">
447             <field name="name">survey_page_tree</field>
448             <field name="model">survey.page</field>
449             <field name="type">tree</field>
450             <field name="arch" type="xml">
451                 <tree string="Survey Page">
452                     <field name="sequence" string="Seq"/>
453                     <field name="title"/>
454                     <field name="survey_id"/>
455                     <field name="question_ids" string="#Questions"/>
456                 </tree>
457             </field>
458         </record>
459
460         <record model="ir.actions.act_window" id="action_survey_page_form">
461             <field name="name">Survey Pages</field>
462             <field name="res_model">survey.page</field>
463             <field name="view_type">form</field>
464             <field name="view_mode">tree,form</field>
465             <field name="view_id" ref="survey_page_tree"></field>
466         </record>
467
468         <menuitem name="Pages" id="menu_survey_page_form1"
469             action="action_survey_page_form" parent='menu_define_survey'
470             groups="group_survey_manager"/>
471
472         <record model="ir.ui.view" id="survey_page_wizard_test1">
473             <field name="name">survey_page_wizard_test</field>
474             <field name="model">survey.page</field>
475             <field name="type">form</field>
476             <field name="arch" type="xml">
477                 <form string="Survey Pages">
478                     <field name="title" colspan="4" select="1"/>
479                     <field name="sequence"/>
480                     <separator string="Description" colspan="4"/>
481                     <field name="note" colspan="4" nolabel="1"/>
482                         <group colspan="4">
483                                 <label string="" colspan="3"/>
484                                                 <button name="survey_save"  string="Ok" type="object" icon="gtk-go-back"/>
485                                         </group>
486                                 </form>
487                         </field>
488                 </record>
489
490         <!--
491             Survey Question
492         -->
493
494         <record model="ir.ui.view" id="survey_question_form">
495             <field name="name">survey_question_form</field>
496             <field name="model">survey.question</field>
497             <field name="type">form</field>
498             <field name="arch" type="xml">
499                 <form string="Survey Question">
500                     <field name="question" colspan="4" select="1"/>
501                     <field name="page_id" select="1"/>
502                     <field name="sequence"/>
503                     <field name="tot_resp" select="2"/>
504                     <field name="type" on_change="on_change_type(type)"/>
505                     <field name="in_visible_rating_weight" invisible="1"/>
506                     <field name="in_visible_menu_choice" invisible="1"/>
507                     <field name="in_visible_answer_type" invisible="1"/>
508                     <notebook colspan="4">
509                         <page string="Options">
510                                                         <group attrs="{'invisible':[('type','!=','multiple_textboxes_diff_type'),('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')]}">
511                                   <separator string="Answer" colspan="4"/>
512                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
513                                            <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}" default_get="{'in_visible_answer_type': in_visible_answer_type}"/>
514                                        </group>
515                                        <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')]}">
516                                            <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}"/>
517                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
518                                                                            <field name="no_of_rows"/>
519                                                                         </group>
520                                        </group>
521                                 </group>
522                                 <newline/>
523                                                         <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')]}">
524                                     <separator string="Comment Field" colspan="4"/>
525                                     <group colspan="4">
526                                                                         <field name="is_comment_require"/>
527                                                                 </group>
528                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
529                                             <group col="4" colspan="4">
530                                                     <field name="comment_field_type" colspan="1"/>
531                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
532                                                         <field colspan="2" name="comment_label" />
533                                                     </group>
534                                                                         </group>
535                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
536                                                 <field name="comment_valid_type" colspan="2"/>
537                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
538                                                     <field name="comment_minimum_no" string="Between"/>
539                                                     <field name="comment_maximum_no" string="and"/>
540                                                 </group>
541                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
542                                                     <field name="comment_minimum_float" string="Between"/>
543                                                     <field name="comment_maximum_float" string="and"/>
544                                                 </group>
545                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
546                                                     <field name="comment_minimum_date" string="Between"/>
547                                                     <field name="comment_maximum_date" string="and"/>
548                                                 </group>
549                                                 <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')]}">
550                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
551                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
552                                                 </group>
553                                             </group>
554                                                                 </group>
555                                 </group>
556                                 <newline/>
557                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
558                                     <field name="comment_column"/>
559                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
560                                         <field name="column_name" colspan="2"/>
561                                     </group>
562                                                         </group>
563                                 <newline/>
564                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
565                                     <separator string="Validation" colspan="4"/>
566                                     <group colspan="4">
567                                                                         <field name="is_validation_require"/>
568                                                                 </group>
569                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
570                                         <field name="validation_type" colspan="2"/>
571                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
572                                             <field name="validation_minimum_no" string="Between"/>
573                                             <field name="validation_maximum_no" string="and"/>
574                                         </group>
575                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
576                                             <field name="validation_minimum_float" string="Between"/>
577                                             <field name="validation_maximum_float" string="and"/>
578                                         </group>
579                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
580                                             <field name="validation_minimum_date" string="Between"/>
581                                             <field name="validation_maximum_date" string="and"/>
582                                         </group>
583                                     </group>
584                                     <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')]}">
585                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
586                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
587                                     </group>
588                                 </group>
589                                 <newline/>
590                                 <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'),('type','!=','multiple_textboxes_diff_type')]}">
591                                     <separator string="Required Answer" colspan="4"/>
592                                     <newline/>
593                                 <field name="is_require_answer"/>
594                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
595                                             <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'),('type','!=','multiple_textboxes_diff_type')]}">
596                                                 <field name="required_type"/>
597                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
598                                                     <field name="req_ans" />
599                                                 </group>
600                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
601                                                     <field name="minimum_req_ans"/>
602                                                     <field name="maximum_req_ans"/>
603                                                 </group>
604                                             </group>
605                                             <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)]}">
606                                                 <label string="When the question is not answered, display this error message:"/>
607                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
608                                             </group>
609                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
610                                                 <group colspan="2" >
611                                                     <field name="numeric_required_sum"/>
612                                                 </group>
613                                                 <newline/>
614                                                 <label string="When the choices do not add up correctly, display this error message"/>
615                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
616                                             </group>
617                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
618                                                 <field name="rating_allow_one_column_require"/>
619                                             </group>
620                                                                 </group>
621                                 </group>
622                                 <newline/>
623                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
624                                     <separator string="Descriptive Text" colspan="4"/>
625                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
626                                 </group>
627                         </page>
628                     </notebook>
629                 </form>
630             </field>
631         </record>
632
633         <record model="ir.ui.view" id="survey_question_tree">
634             <field name="name">survey_question_tree</field>
635             <field name="model">survey.question</field>
636             <field name="type">tree</field>
637             <field name="arch" type="xml">
638                 <tree string="Survey Question">
639                                         <field name="sequence" string="Seq"/>
640                     <field name="question" colspan="4" select="1"/>
641                     <field name="page_id" select="1"/>
642                     <field name="survey" select="1"/>
643                     <field name="type" select="2" />
644                 </tree>
645             </field>
646         </record>
647
648         <record model="ir.actions.act_window" id="action_survey_question_form">
649             <field name="name">Survey Questions</field>
650             <field name="res_model">survey.question</field>
651             <field name="view_type">form</field>
652             <field name="view_mode">tree,form</field>
653             <field name="view_id" ref="survey_question_tree"></field>
654         </record>
655
656         <!--menuitem name="Survey Question" id="menu_survey_question_form1"
657             action="action_survey_question_form" parent='menu_defination'
658             groups="group_survey_manager"/-->
659
660         <record model="ir.ui.view" id="survey_question_wizard_test">
661             <field name="name">survey_question_wizard_test</field>
662             <field name="model">survey.question</field>
663             <field name="type">form</field>
664             <field name="arch" type="xml">
665                 <form string="Survey Question">
666                     <field name="question" colspan="4" select="1"/>
667                     <field name="sequence"/>
668                     <field name="tot_resp" select="2"/>
669                     <field name="type" on_change="on_change_type(type)"/>
670                     <field name="in_visible_rating_weight" invisible="1"/>
671                     <field name="in_visible_menu_choice" invisible="1"/>
672                     <field name="in_visible_answer_type" invisible="1"/>
673                     <notebook colspan="4">
674                         <page string="Options">
675                                                         <group attrs="{'invisible':[('type','!=','multiple_textboxes_diff_type'),('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')]}">
676                                   <separator string="Answer" colspan="4"/>
677                                                            <group colspan="4" attrs="{'invisible':[('type','=','table')]}">
678                                            <field name="answer_choice_ids" nolabel="1" colspan="4" context="{'line_order': answer_choice_ids}" default_get="{'in_visible_answer_type': in_visible_answer_type}"/>
679                                        </group>
680                                        <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')]}">
681                                            <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}"/>
682                                                                         <group colspan="4" attrs="{'invisible':[('type','!=','table')]}">
683                                                                            <field name="no_of_rows"/>
684                                                                         </group>
685                                        </group>
686                                 </group>
687                                 <newline/>
688                                                         <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')]}">
689                                     <separator string="Comment Field" colspan="4"/>
690                                     <group colspan="4">
691                                                                         <field name="is_comment_require"/>
692                                                                 </group>
693                                     <group attrs="{'invisible':[('is_comment_require','=',False)]}">
694                                             <group col="4" colspan="4">
695                                                     <field name="comment_field_type" colspan="1"/>
696                                                     <group colspan="2" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
697                                                         <field colspan="2" name="comment_label" />
698                                                     </group>
699                                                                         </group>
700                                             <group col="6" colspan="4" attrs="{'invisible':[('comment_field_type','!=','char'),('comment_field_type','!=','text')]}">
701                                                 <field name="comment_valid_type" colspan="2"/>
702                                                 <group colspan="2" attrs="{'invisible':[('comment_valid_type','!=','must_be_specific_length'), ('comment_valid_type','!=','must_be_whole_number')]}">
703                                                     <field name="comment_minimum_no" string="Between"/>
704                                                     <field name="comment_maximum_no" string="and"/>
705                                                 </group>
706                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_decimal_number')]}">
707                                                     <field name="comment_minimum_float" string="Between"/>
708                                                     <field name="comment_maximum_float" string="and"/>
709                                                 </group>
710                                                 <group colspan="4" attrs="{'invisible':[('comment_valid_type','!=','must_be_date')]}">
711                                                     <field name="comment_minimum_date" string="Between"/>
712                                                     <field name="comment_maximum_date" string="and"/>
713                                                 </group>
714                                                 <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')]}">
715                                                     <label string="When the comment is an invalid format, display this error message" colspan="4"/>
716                                                     <field name="comment_valid_err_msg" nolabel="1" colspan="4"/>
717                                                 </group>
718                                             </group>
719                                                                 </group>
720                                 </group>
721                                 <newline/>
722                             <group attrs="{'invisible':[('type','!=','matrix_of_choices_only_one_ans'),('type','!=','rating_scale')]}">
723                                     <field name="comment_column"/>
724                                     <group colspan="2" attrs="{'invisible':[('comment_column','!=',True)]}">
725                                         <field name="column_name" colspan="2"/>
726                                     </group>
727                                                         </group>
728                                 <newline/>
729                                 <group attrs="{'invisible':[('type','!=','single_textbox'), ('type','!=','multiple_textboxes')]}">
730                                     <separator string="Validation" colspan="4"/>
731                                     <group colspan="4">
732                                                                         <field name="is_validation_require"/>
733                                                                 </group>
734                                     <group col="6" colspan="4" attrs="{'invisible':[('is_validation_require','=',False)]}">
735                                         <field name="validation_type" colspan="2"/>
736                                         <group colspan="2" attrs="{'invisible':[('validation_type','!=','must_be_specific_length'), ('validation_type','!=','must_be_whole_number')]}">
737                                             <field name="validation_minimum_no" string="Between"/>
738                                             <field name="validation_maximum_no" string="and"/>
739                                         </group>
740                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_decimal_number')]}">
741                                             <field name="validation_minimum_float" string="Between"/>
742                                             <field name="validation_maximum_float" string="and"/>
743                                         </group>
744                                         <group colspan="4" attrs="{'invisible':[('validation_type','!=','must_be_date')]}">
745                                             <field name="validation_minimum_date" string="Between"/>
746                                             <field name="validation_maximum_date" string="and"/>
747                                         </group>
748                                     </group>
749                                     <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')]}">
750                                         <label string="When the comment is an invalid format, display this error message" colspan="4"/>
751                                         <field name="validation_valid_err_msg" nolabel="1" colspan="4"/>
752                                     </group>
753                                 </group>
754                                 <newline/>
755                                 <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'),('type','!=','multiple_textboxes_diff_type')]}">
756                                     <separator string="Required Answer" colspan="4"/>
757                                     <newline/>
758                                 <field name="is_require_answer"/>
759                                                                 <group col="6" colspan="4" attrs="{'invisible':[('is_require_answer','=',False)]}">
760                                             <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'),('type','!=','multiple_textboxes_diff_type')]}">
761                                                 <field name="required_type"/>
762                                                 <group colspan="2" attrs="{'invisible':[('required_type','!=','at least'),('required_type','!=','at most'),('required_type','!=','exactly')]}">
763                                                     <field name="req_ans" />
764                                                 </group>
765                                                 <group colspan="4" attrs="{'invisible':[('required_type','!=','a range')]}">
766                                                     <field name="minimum_req_ans"/>
767                                                     <field name="maximum_req_ans"/>
768                                                 </group>
769                                             </group>
770                                             <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)]}">
771                                                 <label string="When the question is not answered, display this error message:"/>
772                                                 <field name="req_error_msg" colspan="4" nolabel="1"/>
773                                             </group>
774                                             <group colspan="4" attrs="{'invisible':[('type','!=','numerical_textboxes')]}">
775                                                 <group colspan="2" >
776                                                     <field name="numeric_required_sum"/>
777                                                 </group>
778                                                 <newline/>
779                                                 <label string="When the choices do not add up correctly, display this error message"/>
780                                                 <field name="numeric_required_sum_err_msg" colspan="4" nolabel="1"/>
781                                             </group>
782                                             <group colspan="4" attrs="{'invisible':[('type','!=','rating_scale')]}">
783                                                 <field name="rating_allow_one_column_require"/>
784                                             </group>
785                                                                 </group>
786                                 </group>
787                                 <newline/>
788                                 <group attrs="{'invisible':[('type','!=','descriptive_text')]}">
789                                     <separator string="Descriptive Text" colspan="4"/>
790                                     <field name="descriptive_text" colspan="4" nolabel="1"/>
791                                 </group>
792                         </page>
793                     </notebook>
794                         <group colspan="4">
795                                 <label string="" colspan="3"/>
796                                                 <button name="survey_save"  string="Ok" type="object" icon="gtk-ok"/>
797                                         </group>
798                 </form>
799             </field>
800         </record>
801
802         <!--
803             Survey Answer
804         -->
805
806         <record model ="ir.ui.view" id="survey_answer_form">
807             <field name="name">survey_answer_form</field>
808             <field name="model">survey.answer</field>
809             <field name="type">form</field>
810             <field name="arch" type="xml">
811                 <form string="Survey Answer">
812                     <field name="answer" colspan="4" select="1"/>
813                     <field name="sequence"/>
814                     <field name="in_visible_answer_type" invisible="1"/>
815                         <group colspan="4" attrs="{'invisible':[('in_visible_answer_type','=',True)]}">
816                         <field name="type" colspan="2"/>
817                         <group colspan="4" attrs="{'invisible':[('type','!=','selection')]}">
818                                 <separator string="Menu Choices (each choice on separate by lines)" colspan="4"/>
819                                 <field name="menu_choice" colspan="4" nolabel="1"/>
820                         </group>
821                     </group>
822                 </form>
823             </field>
824         </record>
825
826
827         <record model="ir.ui.view" id= "survey_answer_tree">
828             <field name="name">survey_answer_tree</field>
829             <field name="model">survey.answer</field>
830             <field name="type">tree</field>
831             <field name="arch" type="xml">
832                 <tree editable="top" string="Survey Answer">
833                     <field name="sequence" string="Seq"/>
834                     <field name="answer" select="1"/>
835                 </tree>
836             </field>
837         </record>
838
839         <!--
840             Survey Response Line
841         -->
842
843         <record model ="ir.ui.view" id= "survey_response_line_form">
844             <field name="name">survey_response_line_form</field>
845             <field name="model">survey.response.line</field>
846             <field name="type">form</field>
847             <field name="arch" type="xml">
848                 <form string="Survey Answer">
849                         <field name="question_id"/>
850                     <field name="date_create" select="1"/>
851                     <notebook colspan="4">
852                         <page string="Answer">
853                             <field name="response_answer_ids" colspan="4" nolabel="1"/>
854                             <group col="5" colspan="4">
855                                 <field name="state"/>
856                             </group>
857                         </page>
858                         <page string="Single Textboxes">
859                             <field name="single_text" colspan="4"/>
860                         </page>
861                         <page string="Comment">
862                             <separator string="Description" colspan="4"/>
863                             <field name="comment" nolabel="1" colspan="4"/>
864                         </page>
865                         <page string="Table Answer">
866                             <field name="response_table_ids" colspan="4" nolabel="1">
867                             <form string="Table">
868                                 <field name="column_id"/>
869                                 <field name="name"/>
870                                 <field name="value"/>
871                             </form>
872                             <tree string="Table">
873                                 <field name="column_id"/>
874                                 <field name="name"/>
875                                 <field name="value"/>
876                             </tree>
877                             </field>
878                         </page>
879                     </notebook>
880                 </form>
881             </field>
882         </record>
883
884         <record model="ir.ui.view" id="survey_response_line_tree">
885             <field name="name">survey_response_line_tree</field>
886             <field name="model">survey.response.line</field>
887             <field name="type">tree</field>
888             <field name="arch" type="xml">
889                 <tree string="Survey Answer Line">
890                         <field name="page_id"/>
891                     <field name="question_id"/>
892                     <field name="date_create" select="1"/>
893                     <field name="state"/>
894                 </tree>
895             </field>
896         </record>
897
898         <!--
899             Survey Response
900         -->
901
902         <record model="ir.ui.view" id="survey_response_form">
903             <field name="name">survey_response_form</field>
904             <field name="model">survey.response</field>
905             <field name="type">form</field>
906             <field name="arch" type="xml">
907                 <form string="Survey Answer">
908                                         <field name="survey_id" select="1"/>
909                     <field name="date_create" select="1"/>
910                     <field name="user_id" select="1"/>
911                     <field name="response_type" select="1"/>
912                     <field name="question_ids" nolabel="1" colspan="4" />
913                     <field name="state" select="1"/>
914                 </form>
915             </field>
916         </record>
917
918         <record model="ir.ui.view" id="survey_response_tree">
919             <field name="name">survey_response_tree</field>
920             <field name="model">survey.response</field>
921             <field name="type">tree</field>
922             <field name="arch" type="xml">
923                 <tree string="Survey Answer">
924                         <field name="survey_id" select="1"/>
925                     <field name="date_create" select="1"/>
926                     <field name="user_id" select="1"/>
927                     <field name="response_type" select="1"/>
928                     <field name="state" select="1"/>
929                 </tree>
930             </field>
931         </record>
932
933         <!--
934             Survey Response Answer
935         -->
936
937         <record model="ir.ui.view" id="survey_response_answer_form">
938             <field name="name">survey_response_answer_form</field>
939             <field name="model">survey.response.answer</field>
940             <field name="type">form</field>
941             <field name="arch" type="xml">
942                 <form string="Survey Answer">
943                     <group colspan="4">
944                         <field name="answer_id"/>
945                         <field name="answer" />
946                     </group>
947                     <field name="value_choice"/>
948                     <label string="(Use Only Question Type is matrix_of_drop_down_menus)" align="0.0"/>
949                     <group colspan="4" col="4">
950                             <field name="comment_field"/>
951                             <field name="column_id"/>
952                         </group>
953                 </form>
954             </field>
955         </record>
956
957         <record model="ir.ui.view" id="survey_response_answer_tree">
958             <field name="name">survey_response_answer_tree</field>
959             <field name="model">survey.response.answer</field>
960             <field name="type">tree</field>
961             <field name="arch" type="xml">
962                 <tree editable="top" string="Survey Answer">
963                     <field name="answer_id"/>
964                     <field name="answer" />
965                     <field name="value_choice" />
966                     <field name="column_id"/>
967                     <field name="comment_field"/>
968                 </tree>
969             </field>
970         </record>
971
972         <!--
973             Survey Question Column Heading
974     -->
975
976         <record model="ir.ui.view" id="survey_question_column_heading_form">
977             <field name="name">survey_question_column_heading_form</field>
978             <field name="model">survey.question.column.heading</field>
979             <field name="type">form</field>
980             <field name="arch" type="xml">
981                 <form string="Column Heading">
982                     <field name="title"/>
983                     <field name="in_visible_rating_weight" invisible="1"/>
984                     <field name="in_visible_menu_choice" invisible="1"/>
985                     <group colspan="4" attrs="{'invisible':[('in_visible_rating_weight','!=',False)]}">
986                         <field name="rating_weight"/>
987                         <label align="0.0" string="Use if question type is rating_scale" />
988                     </group>
989                     <group colspan="4" attrs="{'invisible':[('in_visible_menu_choice','!=',False)]}">
990                         <separator string="Menu Choices (each choice on separate lines)" colspan="4"/>
991                         <field name="menu_choice" nolabel="1" colspan="4"/>
992                     </group>
993                 </form>
994             </field>
995         </record>
996
997         <record model="ir.ui.view" id="survey_question_column_heading_tree">
998             <field name="name">survey_question_column_heading_tree</field>
999             <field name="model">survey.question.column.heading</field>
1000             <field name="type">tree</field>
1001             <field name="arch" type="xml">
1002                 <tree editable="bottom" string="Column Heading">
1003                     <field name="title"/>
1004                 </tree>
1005             </field>
1006         </record>
1007
1008         <!--
1009             Survey Request
1010         -->
1011
1012         <record model="ir.ui.view" id="survey_request_form">
1013             <field name="name">survey_request_form</field>
1014             <field name="model">survey.request</field>
1015             <field name="type">form</field>
1016             <field name="arch" type="xml">
1017                                 <form string="Survey Request">
1018                     <field name="date_deadline"/>
1019                     <field name="survey_id"/>
1020                     <field name="user_id" on_change="on_change_user(user_id)"/>
1021 <!--                    <field name="email"/>-->
1022                                 <field name="response" readonly="1"/>
1023                     <group colspan="4" col="6">
1024                      <field name="state"/>
1025                         <button name="survey_req_draft" string="Set to Draft" states="cancel,done" type="object" icon="gtk-new"/>
1026                         <button name="survey_req_waiting_answer" string="Watting Answer" states="draft" type="object" icon="gtk-new"/>
1027                         <button name="survey_req_done" string="Done" states="waiting_answer" type="object" icon="gtk-ok"/>
1028                         <button name="survey_req_cancel" string="Cancelled" states="waiting_answer" type="object" icon="gtk-cancel"/>
1029                     </group>
1030                 </form>
1031             </field>
1032         </record>
1033
1034         <record model="ir.ui.view" id="survey_request_tree">
1035             <field name="name">survey_request_tree</field>
1036             <field name="model">survey.request</field>
1037             <field name="type">tree</field>
1038             <field name="arch" type="xml">
1039                 <tree string="Evaluation Plan Phase">
1040                     <field name="date_deadline"/>
1041                                         <field name="user_id"/>
1042                     <field name="survey_id"/>
1043                     <field name="response" />
1044                     <field name="state" />
1045                 </tree>
1046             </field>
1047         </record>
1048
1049        <record id="survey_request_search" model="ir.ui.view">
1050             <field name="name">survey_request_search</field>
1051             <field name="model">survey.request</field>
1052             <field name="type">search</field>
1053             <field name="arch" type="xml">
1054                 <search string="Search Survey">
1055                    <group col='10' colspan='4'>
1056                         <filter icon="terp-crm" string="Unanswered" domain="[('state','=','waiting_answer')]"/>
1057                         <filter icon="terp-stock" string="Late" domain="[('date_deadline','&lt;',current_date)]"/>
1058                         <separator orientation="vertical"/>
1059                         <field name="survey_id" widget="selection" select="1"/>
1060                         <field name="email" select="1"/>
1061                         <field name="user_id" select="1" widget="selection" default="1">
1062                         <filter string="MY" icon="terp-partner" domain="[('user_id','=',uid)]"/>
1063                         </field>
1064                    </group>
1065                </search>
1066             </field>
1067         </record>
1068
1069         <record model="ir.actions.act_window" id="action_survey_request_tree">
1070             <field name="name">Survey Request</field>
1071             <field name="res_model">survey.request</field>
1072             <field name="view_type">form</field>
1073             <field name="view_mode">tree,form</field>
1074             <field name="view_id" ref="survey_request_tree"></field>
1075             <field name="search_view_id" ref="survey_request_search"/>
1076         </record>
1077
1078         <menuitem name="Survey Requests" id="menu_survey_type_form1"
1079             action="action_survey_request_tree" parent='menu_answer_surveys'
1080             groups="group_survey_manager"/>
1081
1082         <!--
1083             Survey Type
1084         -->
1085
1086         <record model="ir.ui.view" id="survey_type_form">
1087             <field name="name">survey_type_form</field>
1088             <field name="model">survey.type</field>
1089             <field name="type">form</field>
1090             <field name="arch" type="xml">
1091                 <form string="Survey Type">
1092                     <field name="name" select="1"/>
1093                     <field name="code" select="1"/>
1094                 </form>
1095             </field>
1096         </record>
1097
1098         <record model="ir.ui.view" id="survey_type_tree">
1099             <field name="name">survey_type_tree</field>
1100             <field name="model">survey.type</field>
1101             <field name="type">tree</field>
1102             <field name="arch" type="xml">
1103                 <tree string="Survey Type">
1104                     <field name="name" select="1"/>
1105                     <field name="code" select="1"/>
1106                 </tree>
1107             </field>
1108         </record>
1109
1110         <record model="ir.actions.act_window" id="action_survey_type_form">
1111             <field name="name">Survey Type</field>
1112             <field name="res_model">survey.type</field>
1113             <field name="view_type">form</field>
1114             <field name="view_mode">tree,form</field>
1115             <field name="view_id" ref="survey_type_tree"></field>
1116         </record>
1117
1118         <!--menuitem name="Survey Types" id="menu_survey_type_form1"
1119             action="action_survey_type_form" parent='menu_survey_config'
1120             groups="group_survey_manager"/-->
1121
1122         <act_window domain="[('survey_id', '=', active_id)]"
1123             id="act_survey_pages"
1124             name="Survey Pages"
1125             res_model="survey.page"
1126             src_model="survey"/>
1127
1128         <act_window domain="[('survey', '=', active_id)]"
1129             id="act_survey_question"
1130             name="All Questions"
1131             res_model="survey.question"
1132             src_model="survey"/>
1133
1134
1135         <act_window domain="[('page_id', '=', active_id)]"
1136             id="act_survey_page_question"
1137             name="Survey Questions"
1138             res_model="survey.question"
1139             src_model="survey.page"/>
1140
1141         <act_window domain="[('question_id', '=', active_id)]"
1142             id="act_survey_answer"
1143             name="Survey Answers"
1144             res_model="survey.answer"
1145             src_model="survey.question"/>
1146
1147         <act_window domain="[('survey_id', '=', active_id)]"
1148             id="act_survey_response"
1149             name="Survey Answer"
1150             res_model="survey.response"
1151             src_model="survey"/>
1152
1153                 <menuitem name="Answer a Survey" id="menu_run_survey_form" sequence="2"
1154                         action="action_view_survey_name" parent="menu_answer_surveys"
1155                         groups="group_survey_manager,group_survey_user" icon="STOCK_INDEX"/>
1156
1157                 <menuitem name="Browse Answers" id="menu_browse_survey_response"
1158                         action="action_browse_survey_response" parent="menu_reporting"
1159                         groups="group_survey_manager" icon="STOCK_PRINT_PREVIEW"/>
1160
1161                 <menuitem action="wizard_browse_answer" id="menu_wizard_browse_answer"
1162                         parent="menu_reporting" type="wizard" icon="STOCK_PRINT" groups="group_survey_manager"/>
1163
1164                 <menuitem action="wizard_print_survey_statistics" id="menu_wizard_print_survey_statistics"
1165                         parent="menu_reporting" type="wizard" icon="STOCK_PRINT" groups="group_survey_manager"/>
1166     </data>
1167 </openerp>