[MERGE]: Merge with lp:openobject-addons
[odoo/odoo.git] / addons / crm_profiling / crm_profiling_view.xml
1 <?xml version="1.0" ?>
2 <openerp>
3     <data>
4
5         <wizard
6             string="Using a questionnaire"
7             model="crm_profiling.questionnaire"
8             name="open_questionnaire"
9             menu="False"
10             id="wizard_open_questionnaire"/>
11
12         <record model="ir.actions.act_window" id="open_questionnaires">
13           <field name="name">Questionnaires</field>
14           <field name="res_model">crm_profiling.questionnaire</field>
15           <field name="view_type">form</field>
16           <field name="view_mode">tree,form</field>
17           <field name="help">You can create specific topic related questionnaires that will be used to guide your team(s) in the sales cycle by helping them to ask the right questions. Using the segmentation tool, you will be able to automatically assign a partner to a category based on his answers to the different questionnaires.</field>
18         </record>
19
20         <menuitem parent="base.menu_crm_config_lead" id="menu_segm_questionnaire"
21                   action="open_questionnaires" />
22
23         <record model="ir.actions.act_window" id="open_questions">
24           <field name="name">Questions</field>
25           <field name="res_model">crm_profiling.question</field>
26           <field name="view_type">form</field>
27           <field name="view_mode">tree,form</field>
28         </record>
29
30         <menuitem parent="base.menu_crm_config_lead" id="menu_segm_answer"
31                   action="open_questions" />
32
33 <!-- Profiling Questionnaire Tree view  -->
34
35     <record model="ir.ui.view" id="view_questionnaire_tree">
36         <field name="name">Questionnaires</field>
37         <field name="model">crm_profiling.questionnaire</field>
38         <field name="type">tree</field>
39         <field name="arch" type="xml">
40           <tree string="Questionnaires">
41             <field name="name" select="1" colspan="4"/>
42             <field name="description" select="1" colspan="4"/>
43             <field name="questions_ids" colspan="4" nolabel="1"/>
44           </tree>
45         </field>
46     </record>
47
48 <!-- Profiling Questionnaire Form view  -->
49
50     <record model="ir.ui.view" id="view_questionnaire_form">
51         <field name="name">Questionnaires</field>
52         <field name="model">crm_profiling.questionnaire</field>
53         <field name="type">form</field>
54         <field name="arch" type="xml">
55           <form string="Questionnaires">
56             <field name="name" select="1" />
57             <newline/>
58             <separator string="Questions List" colspan="4"/>
59             <field name="questions_ids" colspan="4" nolabel="1"/>
60             <newline/>
61             <separator string="Description" colspan="4"/>
62             <field name="description" colspan="4" select="1" nolabel="1"/>
63           </form>
64         </field>
65     </record>
66
67 <!-- Profiling Answer Tree view  -->
68
69     <record model="ir.ui.view" id="view_answer">
70         <field name="name">Answers</field>
71         <field name="model">crm_profiling.answer</field>
72         <field name="type">tree</field>
73         <field name="arch" type="xml">
74           <tree string="Answers">
75             <field name="question_id" select="1"/>
76             <field name="name" select="1"/>
77           </tree>
78         </field>
79     </record>
80
81 <!-- Profiling Answer Form view  -->
82
83     <record model="ir.ui.view" id="view_answer_form">
84         <field name="name">Answers</field>
85         <field name="model">crm_profiling.answer</field>
86         <field name="type">form</field>
87         <field name="arch" type="xml">
88           <form string="Answers">
89             <field name="question_id" select="1"/>
90             <field name="name" select="1"/>
91           </form>
92         </field>
93     </record>
94
95 <!-- Profiling Questions Tree view  -->
96
97     <record model="ir.ui.view" id="view_question_tree">
98         <field name="name">Questions</field>
99         <field name="model">crm_profiling.question</field>
100         <field name="type">tree</field>
101         <field name="arch" type="xml">
102           <tree string="Questions">
103             <field name="name" select="1" colspan="4"/>
104             <field name="answers_ids" colspan="4" nolabel="1"/>
105           </tree>
106         </field>
107     </record>
108
109 <!-- Profiling Questions Form view  -->
110
111     <record model="ir.ui.view" id="view_question_form">
112         <field name="name">Questions</field>
113         <field name="model">crm_profiling.question</field>
114         <field name="type">form</field>
115         <field name="arch" type="xml">
116           <form string="Questions">
117             <newline/>
118             <field name="name" select="1" />
119             <newline/>
120             <separator string="Avalaible answers" colspan="4"/>
121             <field name="answers_ids" colspan="4" nolabel="1" editable="bottom">
122               <tree string="Answers" editable="bottom">
123                 <field name="name" select="1"/>
124               </tree>
125               <form string="Answers">
126                 <field name="name" select="1"/>
127               </form>
128             </field>
129           </form>
130         </field>
131     </record>
132
133
134     <record model="ir.ui.view" id="view_partner_form">
135         <field name="name">res.partner.profile.form</field>
136         <field name="model">res.partner</field>
137         <field name="type">form</field>
138         <field name="inherit_id" ref="base.view_partner_form"/>
139         <field name="arch" type="xml">
140             <notebook position="inside">
141                 <page string="Profiling">
142                   <button string="Use a questionnaire"
143                       name="%(wizard_open_questionnaire)d" type="action" colspan="1"
144                       icon="gtk-justify-fill" />
145                   <newline/>
146                   <field name="answers_ids" colspan="4" nolabel="1"/>
147                 </page>
148             </notebook>
149         </field>
150     </record>
151
152 <!-- CRM Segmentation Form view  -->
153
154     <record model="ir.ui.view" id="crm.crm_segmentation-view">
155         <field name="name">crm.segmentation.form</field>
156         <field name="model">crm.segmentation</field>
157         <field name="type">form</field>
158         <field name="arch" type="xml">
159             <form string="Partner Segmentation">
160                 <notebook>
161                 <page string="Segmentation">
162                     <separator string="Segmentation Description" colspan="4"/>
163                     <field name="name" select="1"/>
164                     <field name="exclusif"/>
165                     <newline/>
166                     <field name="categ_id" colspan="2"/>
167                     <newline/>
168                     <field name="description" colspan="4"/>
169                     <field name="state"/>
170                     <group col="3" colspan="2">
171                         <button name="process_start"
172                             states="not running" string="Compute Segmentation" type="object"
173                             icon="gtk-apply" />
174                         <button name="process_stop" states="running"
175                             string="Stop Process" type="object" icon="gtk-stop" />
176                         <button name="process_continue" states="running"
177                             string="Continue Process" type="object" icon="gtk-go-forward" />
178                     </group>
179                 </page>
180                 <page string="Sales Purchase">
181                     <field name="sales_purchase_active"/>
182                     <separator string="State of Mind Computation" colspan="4"/>
183                     <field name="som_interval"/>
184                     <field name="som_interval_max"/>
185                     <field name="som_interval_decrease"/>
186                     <field name="som_interval_default"/>
187                     <separator string="Segmentation Test" colspan="4"/>
188                     <field name="segmentation_line" widget="one2many_list" colspan="4"/>
189                 </page>
190                 <page string="Profiling">
191                     <field name="profiling_active" colspan="2"/>
192                     <separator string="Profiling Options" colspan="4"/>
193                     <field name="parent_id" colspan="2"/><newline/>
194                     <separator string="Included Answers :" colspan="2" />
195                     <separator string="Excluded Answers :" colspan="2"/>
196                     <field name="answer_yes" nolabel="1" colspan="2"/>
197                     <field name="answer_no" nolabel="1" colspan="2"/>
198                 </page>
199                 </notebook>
200             </form>
201         </field>
202     </record>
203
204 <!-- CRM Segmentation Tree view  -->
205
206     <record model="ir.ui.view" id="view_partner_crm_segmentation_tree">
207         <field name="name">crm.segmentation.tree</field>
208         <field name="model">crm.segmentation</field>
209         <field name="type">tree</field>
210         <field name="arch" type="xml">
211             <tree string="Partner Segmentations">
212                 <field name="name"/>
213                 <field name="description"/>
214                 <field name="categ_id"/>
215             </tree>
216         </field>
217     </record>
218
219     </data>
220 </openerp>