[MERGE] lp:~openerp-commiter/openobject-addons/trunk-red-button-crm-aja
[odoo/odoo.git] / addons / crm / crm_report_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3 <data>
4
5 <!--  Cases by section and category2 of case Tree View -->
6
7     <record model="ir.ui.view" id="view_crm_case_section_categ_tree">
8         <field name="name">CRM Report - Teams and Type(Tree)</field>
9         <field name="model">report.crm.case.section.categ2</field>
10         <field name="type">tree</field>
11         <field name="arch" type="xml">
12             <tree string="Cases by Team and Type">
13                 <field name="name"/>
14                 <field name="month"/>
15                 <field name="user_id"/>
16                 <field name="section_id"/>
17                 <field name="category2_id"/>
18                 <field name="stage_id"/>
19                 <field name="amount_revenue"/>
20                 <field name="nbr"/>
21                 <field name="delay_close"/>
22                 <field name="state"/>
23             </tree>
24         </field>
25     </record>
26
27 <!--  Cases by section and category2 of case Form View -->
28
29     <record model="ir.ui.view" id="view_crm_case_section_categ_form">
30         <field name="name">CRM Report - Teams and Type(Form)</field>
31         <field name="model">report.crm.case.section.categ2</field>
32         <field name="type">form</field>
33         <field name="arch" type="xml">
34             <form string="Cases by Team and Category2">
35                 <field name="name"/>
36                 <field name="month"/>
37                 <field name="user_id"/>
38                 <field name="section_id" select="1" widget="selection"/>
39                 <field name="category2_id" select="1"/>
40                 <field name="stage_id"/>
41                 <field name="amount_revenue"/>
42                 <field name="nbr" select="1"/>
43                 <field name="state" select="1"/>
44                 <field name="delay_close"/>
45             </form>
46         </field>
47     </record>
48
49 <!--  Cases by section and category2 of case Graph View -->
50
51     <record model="ir.ui.view" id="view_crm_case_section_categ_graph">
52         <field name="name">CRM Report - Teams and Type(Graph)</field>
53         <field name="model">report.crm.case.section.categ2</field>
54         <field name="type">graph</field>
55         <field name="arch" type="xml">
56             <graph string="Cases by Teams and Type" type="bar" orientation="horizontal">
57                 <field name="category2_id"/>
58                 <field name="amount_revenue" operator="+"/>
59                 <field name="section_id" group="True"/>
60             </graph>
61         </field>
62     </record>
63
64 <!--  Cases by section and category2 of case Search View -->
65
66     <record id="view_crm_case_section_categ_filter" model="ir.ui.view">
67             <field name="name">CRM Report - Teams and Type(Select)</field>
68             <field name="model">report.crm.case.section.categ2</field>
69             <field name="type">search</field>
70             <field name="arch" type="xml">
71                 <search string="Cases by Team and Type">
72                    <group>
73                            <filter string="This Year" icon="terp-go-year"
74                                domain="[('name','=',time.localtime()[0])]"
75                                help="Cases by Team and Type for this year" />
76                            <filter string="This Month" icon="terp-go-month"
77                                domain="[('month','=',time.localtime()[1])]"
78                                help="Cases by Team and Type for this month" />
79                            <separator orientation="vertical"/>
80                            <field name="section_id"
81                                widget="selection" />
82                            <field name="category2_id"/>
83                         <field name="nbr"/>
84                         <field name="state"/>
85                    </group>
86                </search>
87             </field>
88         </record>
89
90 <!--  Cases by section and category2 of case Action -->
91
92     <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_tree">
93         <field name="name">Cases By Section and Category</field>
94         <field name="res_model">report.crm.case.section.categ2</field>
95         <field name="view_type">form</field>
96         <field name="view_mode">graph,tree</field>
97         <field name="search_view_id" ref="view_crm_case_section_categ_filter"/>
98     </record>
99
100 <!-- Cases by section and stage Tree View -->
101
102     <record model="ir.ui.view" id="view_crm_case_section_stage_tree">
103         <field name="name">CRM Report - Teams and Stage(Tree)</field>
104         <field name="model">report.crm.case.section.stage</field>
105         <field name="type">tree</field>
106         <field name="arch" type="xml">
107             <tree string="Cases by Team and Stage">
108                 <field name="name"/>
109                 <field name="month"/>
110                 <field name="user_id"/>
111                 <field name="section_id"/>
112                 <field name="stage_id"/>
113                 <field name="amount_revenue"/>
114                 <field name="nbr"/>
115                 <field name="delay_close"/>
116                 <field name="state"/>
117             </tree>
118         </field>
119     </record>
120
121 <!-- Cases by section and stage Form View -->
122
123     <record model="ir.ui.view" id="view_crm_case_section_stage_form">
124         <field name="name">CRM Report - Teams and Stage(Form)</field>
125         <field name="model">report.crm.case.section.stage</field>
126         <field name="type">form</field>
127         <field name="arch" type="xml">
128             <form string="Cases by Team and Stage">
129                 <field name="name"/>
130                 <field name="month"/>
131                 <field name="user_id"/>
132                 <field name="section_id" select="1" widget="selection"/>
133                 <field name="stage_id"/>
134                 <field name="amount_revenue"/>
135                 <field name="nbr" select="1"/>
136                 <field name="state" select="1"/>
137                 <field name="delay_close"/>
138             </form>
139         </field>
140     </record>
141
142 <!-- Cases by section and stage Graph View -->
143
144     <record model="ir.ui.view" id="view_crm_case_section_stage_graph">
145         <field name="name">CRM Report - Teams and Stage(Graph)</field>
146         <field name="model">report.crm.case.section.stage</field>
147         <field name="type">graph</field>
148         <field name="arch" type="xml">
149             <graph string="Cases by Team and Stage" type="bar" orientation="horizontal">
150                 <field name="stage_id"/>
151                 <field name="amount_revenue" operator="+"/>
152                 <field name="section_id" group="True"/>
153             </graph>
154         </field>
155     </record>
156
157 <!-- Cases by section and stage Search View -->
158
159     <record id="view_crm_case_section_stage_filter" model="ir.ui.view">
160             <field name="name">CRM Report - Teams and Stage(Select)</field>
161             <field name="model">report.crm.case.section.stage</field>
162             <field name="type">search</field>
163             <field name="arch" type="xml">
164                 <search string="Cases by Team and Stage">
165                    <group>
166                            <filter string="This Year" icon="terp-go-year"
167                                domain="[('name','=',time.localtime()[0])]"
168                                help="Cases by Team and Stage for this year" />
169                            <filter string="This Month" icon="terp-go-month"
170                                domain="[('month','=',time.localtime()[1])]"
171                                help="Cases by Team and Stage for this month" />
172                            <separator orientation="vertical"/>
173                         <field name="section_id" widget="selection"/>
174                         <field name="nbr"/>
175                         <field name="state"/>
176                    </group>
177                </search>
178             </field>
179         </record>
180
181 <!-- Cases by section and stage Action -->
182
183     <record model="ir.actions.act_window" id="action_report_crm_case_section_stage_tree">
184         <field name="name">Cases By Section and Stage</field>
185         <field name="res_model">report.crm.case.section.stage</field>
186         <field name="view_type">form</field>
187         <field name="view_mode">graph,tree</field>
188         <field name="search_view_id" ref="view_crm_case_section_stage_filter"/>
189     </record>
190
191 <!-- Cases by section, category and stage Tree View -->
192
193     <record model="ir.ui.view" id="view_crm_case_section_categ_stage_tree">
194         <field name="name">CRM Report - Team, Category and Stage(Tree)</field>
195         <field name="model">report.crm.case.section.categ.stage</field>
196         <field name="type">tree</field>
197         <field name="arch" type="xml">
198             <tree string="Cases by Team, Category and Stage">
199                 <field name="name"/>
200                 <field name="month"/>
201                 <field name="user_id"/>
202                 <field name="section_id"/>
203                 <field name="categ_id"/>
204                 <field name="stage_id"/>
205                 <field name="nbr"/>
206                 <field name="delay_close"/>
207                 <field name="state"/>
208             </tree>
209         </field>
210     </record>
211
212 <!-- Cases by section, category and stage Form View -->
213
214     <record model="ir.ui.view" id="view_crm_case_section_categ_stage_form">
215         <field name="name">CRM Report - Team, Category and Stage(Form)</field>
216         <field name="model">report.crm.case.section.categ.stage</field>
217         <field name="type">form</field>
218         <field name="arch" type="xml">
219             <form string="Cases by Section, Category and Stage">
220                 <field name="name"/>
221                 <field name="month"/>
222                 <field name="user_id"/>
223                 <field name="section_id" select="1" widget="selection"/>
224                 <field name="categ_id"/>
225                 <field name="stage_id"/>
226                 <field name="nbr" select="1"/>
227                 <field name="state" select="1"/>
228                 <field name="delay_close"/>
229             </form>
230         </field>
231     </record>
232
233 <!-- Cases by section, category and stage Search View -->
234
235     <record id="view_crm_case_section_categ_stage_filter" model="ir.ui.view">
236             <field name="name">CRM Report - Section, Category and Stage(Select)</field>
237             <field name="model">report.crm.case.section.categ.stage</field>
238             <field name="type">search</field>
239             <field name="arch" type="xml">
240                 <search string="Cases by Section, Category and Stage">
241                    <group>
242                            <filter string="This Year" icon="terp-go-year"
243                                domain="[('name','=',time.localtime()[0])]"
244                                help="Cases by Section, Category and Stage for this year" />
245                            <filter string="This Month" icon="terp-go-month"
246                                domain="[('month','=',time.localtime()[1])]"
247                                help="Cases by Section, Category and Stage for this month" />
248                            <separator orientation="vertical"/>
249                         <field name="section_id" widget="selection"/>
250                         <field name="nbr"/>
251                         <field name="state"/>
252
253                    </group>
254                </search>
255             </field>
256         </record>
257
258 <!-- Cases by section, category and stage Graph View -->
259
260     <record model="ir.ui.view" id="view_crm_case_section_categ_stage_graph">
261         <field name="name">CRM Report - Section, Category and Stage(Select)</field>
262         <field name="model">report.crm.case.section.categ.stage</field>
263         <field name="type">graph</field>
264         <field name="arch" type="xml">
265             <graph string="Cases by Section, Category and Stage" type="bar" orientation="horizontal">
266                 <field name="categ_id"/>
267                 <field name="nbr" operator="+"/>
268                 <field name="section_id" group="True"/>
269             </graph>
270         </field>
271     </record>
272
273 <!-- Cases by section, category and stage Action -->
274
275     <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_stage_tree">
276         <field name="name">Cases By Section ,Category and Stage</field>
277         <field name="res_model">report.crm.case.section.categ.stage</field>
278         <field name="view_type">form</field>
279         <field name="view_mode">tree,graph</field>
280         <field name="search_view_id" ref="view_crm_case_section_categ_stage_filter"/>
281     </record>
282
283 <!--  Cases by section, category and category2 Tree View -->
284
285     <record model="ir.ui.view" id="view_crm_case_section_categ_categ2_tree">
286         <field name="name">CRM Report - Section, Category and Type(Tree)</field>
287         <field name="model">report.crm.case.section.categ.categ2</field>
288         <field name="type">tree</field>
289         <field name="arch" type="xml">
290             <tree string="Cases by Section, Category and Type">
291                 <field name="name"/>
292                 <field name="month"/>
293                 <field name="user_id"/>
294                 <field name="section_id"/>
295                 <field name="categ_id"/>
296                 <field name="category2_id"/>
297                 <field name="stage_id"/>
298                 <field name="nbr"/>
299                 <field name="delay_close"/>
300                 <field name="state"/>
301             </tree>
302         </field>
303     </record>
304
305 <!--  Cases by section, category and category2 Form View -->
306
307     <record model="ir.ui.view" id="view_crm_case_section_categ_categ2_form">
308         <field name="name">CRM Report - Section, Category and Type(Form)</field>
309         <field name="model">report.crm.case.section.categ.categ2</field>
310         <field name="type">form</field>
311         <field name="arch" type="xml">
312             <form string="Cases by Section, Category and Type">
313                 <field name="name"/>
314                 <field name="month"/>
315                 <field name="user_id"/>
316                 <field name="section_id" select="1" widget="selection"/>
317                 <field name="categ_id"/>
318                 <field name="category2_id"/>
319                 <field name="stage_id"/>
320                 <field name="nbr" select="1"/>
321                 <field name="state" select="1"/>
322                 <field name="delay_close"/>
323             </form>
324         </field>
325     </record>
326
327 <!--  Cases by section, category and category2 Search View -->
328
329     <record id="view_crm_case_section_categ_categ2_filter" model="ir.ui.view">
330             <field name="name">CRM Report - Section, Category and Type(Select)</field>
331             <field name="model">report.crm.case.section.categ.categ2</field>
332             <field name="type">search</field>
333             <field name="arch" type="xml">
334                 <search string="Search Cases by User">
335                    <group>
336                            <filter string="This Year" icon="terp-go-year"
337                                domain="[('name','=',time.localtime()[0])]"
338                                help="Cases by User for this year" />
339                            <filter string="This Month" icon="terp-go-month"
340                                domain="[('month','=',time.localtime()[1])]"
341                                help="Cases by User for this month" />
342                            <separator orientation="vertical"/>
343                         <field name="section_id" widget="selection"/>
344                         <field name="nbr"/>
345                         <field name="state"/>
346                    </group>
347                </search>
348             </field>
349     </record>
350
351 <!--  Cases by section, category and category2 Graph View -->
352
353     <record model="ir.ui.view" id="view_crm_case_section_categ_categ2_graph">
354         <field name="name">CRM Report - Section, Category and Type(Select)</field>
355         <field name="model">report.crm.case.section.categ.categ2</field>
356         <field name="type">graph</field>
357         <field name="arch" type="xml">
358             <graph string="Cases by Section, Category and Type" type="bar" orientation="horizontal">
359                 <field name="category2_id"/>
360                 <field name="nbr" operator="+"/>
361                 <field name="section_id" group="True"/>
362             </graph>
363         </field>
364     </record>
365
366 <!--  Cases by section, category and category2 Action -->
367
368     <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_categ2_tree">
369         <field name="name">Cases By Section ,Category and Category2</field>
370         <field name="res_model">report.crm.case.section.categ.categ2</field>
371         <field name="view_type">form</field>
372         <field name="view_mode">tree,graph</field>
373         <field name="search_view_id" ref="view_crm_case_section_categ_categ2_filter"/>
374     </record>
375
376 </data>
377 </openerp>