revert merge
[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 - Sections 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 Section 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 - Sections 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 Section 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 - Sections 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 Section 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 - Sections 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 Section and Type">
72                    <group col="10" colspan="4">
73                                 <filter string="This Year" icon="terp-hr"
74                                         domain="[('name','=',time.localtime()[0])]"
75                                         help="Cases by Section and Type for this year" />
76                                 <filter string="This Month" icon="terp-hr"
77                                         domain="[('month','=',time.localtime()[1])]"
78                                         help="Cases by Section and Type for this month" />
79                                 <separator orientation="vertical"/>
80                                 <field name="section_id"
81                                         default="context.get('section_id', False)"
82                                         select="1" widget="selection" />
83                                 <field name="category2_id" select="1"/>
84                                 <field name="nbr" select="1"/>
85                                 <field name="state" select="1"/>
86                    </group>
87                </search>
88             </field>
89         </record>
90
91 <!--  Cases by section and category2 of case Action -->
92
93     <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_tree">
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 - Sections 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 Section 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 - Sections 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 Section 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 - Sections 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 Section 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 - Sections 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 Section and Stage">
165                    <group col="8" colspan="4">
166                                 <filter string="This Year" icon="terp-hr"
167                                         domain="[('name','=',time.localtime()[0])]"
168                                         help="Cases by Section and Stage for this year" />
169                                 <filter string="This Month" icon="terp-hr"
170                                         domain="[('month','=',time.localtime()[1])]"
171                                         help="Cases by Section and Stage for this month" />
172                                 <separator orientation="vertical"/>
173                                                 <field name="section_id" select="1" widget="selection"/>
174                                 <field name="nbr" select="1"/>
175                                 <field name="state" select="1"/>
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="res_model">report.crm.case.section.stage</field>
185         <field name="view_type">form</field>
186         <field name="view_mode">graph,tree</field>
187         <field name="search_view_id" ref="view_crm_case_section_stage_filter"/>
188     </record>
189
190 <!-- Cases by section, category and stage Tree View -->
191
192     <record model="ir.ui.view" id="view_crm_case_section_categ_stage_tree">
193         <field name="name">CRM Report - Section, Category and Stage(Tree)</field>
194         <field name="model">report.crm.case.section.categ.stage</field>
195         <field name="type">tree</field>
196         <field name="arch" type="xml">
197             <tree string="Cases by Section, Category and Stage">
198                 <field name="name"/>
199                 <field name="month"/>
200                 <field name="user_id"/>
201                 <field name="section_id"/>
202                 <field name="categ_id"/>
203                 <field name="stage_id"/>
204                 <field name="nbr"/>
205                 <field name="delay_close"/>
206                 <field name="state"/>
207             </tree>
208         </field>
209     </record>
210
211 <!-- Cases by section, category and stage Form View -->
212
213     <record model="ir.ui.view" id="view_crm_case_section_categ_stage_form">
214         <field name="name">CRM Report - Section, Category and Stage(Form)</field>
215         <field name="model">report.crm.case.section.categ.stage</field>
216         <field name="type">form</field>
217         <field name="arch" type="xml">
218             <form string="Cases by Section, Category and Stage">
219                 <field name="name"/>
220                 <field name="month"/>
221                 <field name="user_id"/>
222                 <field name="section_id" select="1" widget="selection"/>
223                 <field name="categ_id"/>
224                 <field name="stage_id"/>
225                 <field name="nbr" select="1"/>
226                 <field name="state" select="1"/>
227                 <field name="delay_close"/>
228             </form>
229         </field>
230     </record>
231
232 <!-- Cases by section, category and stage Search View -->
233
234     <record id="view_crm_case_section_categ_stage_filter" model="ir.ui.view">
235             <field name="name">CRM Report - Section, Category and Stage(Select)</field>
236             <field name="model">report.crm.case.section.categ.stage</field>
237             <field name="type">search</field>
238             <field name="arch" type="xml">
239                 <search string="Cases by Section, Category and Stage">
240                    <group col='8' colspan='4'>
241                                 <filter string="This Year" icon="terp-hr"
242                                         domain="[('name','=',time.localtime()[0])]"
243                                         help="Cases by Section, Category and Stage for this year" />
244                                 <filter string="This Month" icon="terp-hr"
245                                         domain="[('month','=',time.localtime()[1])]"
246                                         help="Cases by Section, Category and Stage for this month" />
247                                 <separator orientation="vertical"/>
248                                                 <field name="section_id" select="1" widget="selection"/>
249                                                 <field name="nbr" select="1"/>
250                                 <field name="state" select="1"/>
251
252                    </group>
253                </search>
254             </field>
255         </record>
256
257 <!-- Cases by section, category and stage Graph View -->
258
259         <record model="ir.ui.view" id="view_crm_case_section_categ_stage_graph">
260         <field name="name">CRM Report - Section, Category and Stage(Select)</field>
261         <field name="model">report.crm.case.section.categ.stage</field>
262         <field name="type">graph</field>
263         <field name="arch" type="xml">
264             <graph string="Cases by Section, Category and Stage" type="bar" orientation="horizontal">
265                 <field name="categ_id"/>
266                 <field name="nbr" operator="+"/>
267                 <field name="section_id" group="True"/>
268             </graph>
269         </field>
270     </record>
271
272 <!-- Cases by section, category and stage Action -->
273
274     <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_stage_tree">
275         <field name="res_model">report.crm.case.section.categ.stage</field>
276         <field name="view_type">form</field>
277         <field name="view_mode">tree,graph</field>
278         <field name="search_view_id" ref="view_crm_case_section_categ_stage_filter"/>
279     </record>
280
281 <!--  Cases by section, category and category2 Tree View -->
282
283     <record model="ir.ui.view" id="view_crm_case_section_categ_categ2_tree">
284         <field name="name">CRM Report - Section, Category and Type(Tree)</field>
285         <field name="model">report.crm.case.section.categ.categ2</field>
286         <field name="type">tree</field>
287         <field name="arch" type="xml">
288             <tree string="Cases by Section, Category and Type">
289                 <field name="name"/>
290                 <field name="month"/>
291                 <field name="user_id"/>
292                 <field name="section_id"/>
293                 <field name="categ_id"/>
294                 <field name="category2_id"/>
295                 <field name="stage_id"/>
296                 <field name="nbr"/>
297                 <field name="delay_close"/>
298                 <field name="state"/>
299             </tree>
300         </field>
301     </record>
302
303 <!--  Cases by section, category and category2 Form View -->
304
305     <record model="ir.ui.view" id="view_crm_case_section_categ_categ2_form">
306         <field name="name">CRM Report - Section, Category and Type(Form)</field>
307         <field name="model">report.crm.case.section.categ.categ2</field>
308         <field name="type">form</field>
309         <field name="arch" type="xml">
310             <form string="Cases by Section, Category and Type">
311                 <field name="name"/>
312                 <field name="month"/>
313                 <field name="user_id"/>
314                 <field name="section_id" select="1" widget="selection"/>
315                 <field name="categ_id"/>
316                 <field name="category2_id"/>
317                 <field name="stage_id"/>
318                 <field name="nbr" select="1"/>
319                 <field name="state" select="1"/>
320                 <field name="delay_close"/>
321             </form>
322         </field>
323     </record>
324
325 <!--  Cases by section, category and category2 Search View -->
326
327         <record id="view_crm_case_section_categ_categ2_filter" model="ir.ui.view">
328             <field name="name">CRM Report - Section, Category and Type(Select)</field>
329             <field name="model">report.crm.case.section.categ.categ2</field>
330             <field name="type">search</field>
331             <field name="arch" type="xml">
332                 <search string="Search Cases by User">
333                    <group col='12' colspan='4'>
334                                 <filter string="This Year" icon="terp-hr"
335                                         domain="[('name','=',time.localtime()[0])]"
336                                         help="Cases by User for this year" />
337                                 <filter string="This Month" icon="terp-hr"
338                                         domain="[('month','=',time.localtime()[1])]"
339                                         help="Cases by User for this month" />
340                                 <separator orientation="vertical"/>
341                                                 <field name="section_id" select="1" widget="selection"/>
342                                                 <field name="nbr" select="1"/>
343                                 <field name="state" select="1"/>
344                    </group>
345                </search>
346             </field>
347     </record>
348
349 <!--  Cases by section, category and category2 Graph View -->
350
351     <record model="ir.ui.view" id="view_crm_case_section_categ_categ2_graph">
352         <field name="name">CRM Report - Section, Category and Type(Select)</field>
353         <field name="model">report.crm.case.section.categ.categ2</field>
354         <field name="type">graph</field>
355         <field name="arch" type="xml">
356             <graph string="Cases by Section, Category and Type" type="bar" orientation="horizontal">
357                 <field name="category2_id"/>
358                 <field name="nbr" operator="+"/>
359                 <field name="section_id" group="True"/>
360             </graph>
361         </field>
362     </record>
363
364 <!--  Cases by section, category and category2 Action -->
365
366     <record model="ir.actions.act_window" id="action_report_crm_case_section_categ_categ2_tree">
367         <field name="res_model">report.crm.case.section.categ.categ2</field>
368         <field name="view_type">form</field>
369         <field name="view_mode">tree,graph</field>
370         <field name="search_view_id" ref="view_crm_case_section_categ_categ2_filter"/>
371     </record>
372
373 </data>
374 </openerp>