[IMP] Clean Modules name: there are 3 modules named Contracts Management.
[odoo/odoo.git] / addons / crm_fundraising / crm_fundraising_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4            <!-- Fund Raising Configuration Menu -->
5         <menuitem id="menu_config_fundrising" name="Fund Raising"
6             groups="base.group_no_one"
7             parent="base.menu_base_config" sequence="65" />
8
9         <!-- Fund Raising Categories Form View -->
10
11         <record id="crm_fund_categ_action" model="ir.actions.act_window">
12             <field name="name">Fundraising Categories</field>
13             <field name="res_model">crm.case.categ</field>
14             <field name="view_type">form</field>
15             <field name="view_id" ref="crm.crm_case_categ_tree-view"/>
16             <field name="domain">[('object_id.model', '=', 'crm.fundraising')]</field>
17             <field name="context" eval="{'object_id': ref('model_crm_fundraising')}"/>
18             <field name="help">Manage and define the fund raising categories you want to be maintained in the system.</field>
19         </record>
20
21         <menuitem action="crm_fund_categ_action" name="Categories"
22             id="menu_crm_case_fundraising-act" groups="base.group_no_one"
23             parent="menu_config_fundrising" />
24
25         <!-- Fund Stage Form View -->
26
27         <record id="crm_fundraising_stage_act" model="ir.actions.act_window">
28             <field name="name">Fundraising Stages</field>
29             <field name="res_model">crm.case.stage</field>
30             <field name="view_type">form</field>
31             <field name="view_id" ref="crm.crm_case_stage_tree"/>
32             <field name="context">{'search_default_fundraising':1}</field>
33             <field name="help">Create and manage fund raising activity categories you want to be maintained in the system.</field>
34         </record>
35
36         <!-- Fund Raising Tree View -->
37
38         <record model="ir.ui.view" id="crm_case_tree_view_fund">
39             <field name="name">CRM - Funds Tree</field>
40             <field name="model">crm.fundraising</field>
41             <field name="type">tree</field>
42             <field name="arch" type="xml">
43                 <tree string="Funds Tree"
44                     colors="blue:state=='pending';grey:state in ('cancel', 'done')">
45                     <field name="name" string="Fund Description" />
46                     <field name="categ_id" />
47                     <field name="type_id" string="Payment Mode" />
48                     <field name="planned_cost" string="Amount" />
49                     <field name="probability" />
50                     <field name="user_id" />
51                     <field name="state" />
52                     <field name="partner_id" invisible="1"/>
53                 </tree>
54             </field>
55         </record>
56
57         <!-- Fund Raising Form View -->
58
59         <record model="ir.ui.view" id="crm_case_form_view_fund">
60             <field name="name">CRM - Funds Form</field>
61             <field name="model">crm.fundraising</field>
62             <field name="type">form</field>
63             <field name="arch" type="xml">
64                 <form version="7.0">
65                 <header>
66                     <button name="case_close" string="Done" states="open,pending" type="object" />
67                     <button name="case_open" string="Open" states="draft,pending" type="object" />
68                     <button name="case_pending" string="Pending" states="draft,open" type="object" />
69                     <button name="case_escalate" string="Escalate" states="open,draft,pending" type="object" groups="base.group_extended" />
70                     <button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" />
71                     <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" />
72                     <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
73                 </header>
74                 <sheet string="Funds Form" layout="auto">
75                     <group col="4">
76                         <field name="name" string="Name"/>
77                         <field name="section_id" colspan="1" widget="selection"/>
78                         <field name="user_id" string="Responsible"/>
79                         <field name="date"/>
80                         <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
81                         <field name="type_id" string="Payment Mode" widget="selection"/>
82                     </group>
83                     <notebook>
84                         <page string="Funds">
85                             <group>
86                                 <group string="Communication">
87                                     <field name="partner_id"
88                                         on_change="onchange_partner_id(partner_id, email_from)"
89                                         />
90                                     <field name="email_from"/>
91                                 </group>
92                                 <group string="Estimates">
93                                     <field name="planned_cost"/>
94                                     <field name="planned_revenue"/>
95                                     <field name="probability"/>
96                                 </group>
97                             </group>
98                             <separator colspan="4" string="Notes"/>
99                             <field name="description"/>
100                         </page>
101                         <page string="Extra Info">
102                             <group>
103                                 <group string="Misc">
104                                     <field name="active"/>
105                                     <field name="id"/>
106                                     <field name="priority" string="Priority"/>
107                                 </group>
108                                 <group groups="base.group_no_one" string="Dates">
109                                     <field name="create_date"/>
110                                     <field name="date_closed"/>
111                                     <field name="duration"/>
112                                 </group>
113                                 <group string="References">
114                                     <field name="ref"/>
115                                     <field name="ref2"/>
116                                 </group>
117                             </group>
118                         </page>
119                     </notebook>
120                 </sheet>
121                 <footer>
122                     <field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
123                 </footer>
124                 </form>
125             </field>
126         </record>
127
128         <!-- Fund Raising Calendar View -->
129
130         <record model="ir.ui.view" id="crm_case_calendar_view_fund">
131             <field name="name">CRM - Funds Calendar</field>
132             <field name="model">crm.fundraising</field>
133             <field name="type">calendar</field>
134             <field name="priority" eval="2"/>
135             <field name="arch" type="xml">
136                 <calendar string="Funds" date_start="date" color="user_id" date_delay="duration">
137                     <field name="name"/>
138                     <field name="partner_id"/>
139                 </calendar>
140             </field>
141         </record>
142
143         <!-- Fund Raising Graph View -->
144
145         <record model="ir.ui.view" id="crm_case_graph_view_fund">
146             <field name="name">CRM - Funds Graph</field>
147             <field name="model">crm.fundraising</field>
148             <field name="type">graph</field>
149             <field name="arch" type="xml">
150                 <graph string="Funds by Categories" type="bar" orientation="horizontal">
151                     <field name="categ_id"/>
152                     <field name="planned_cost" operator="+"/>
153                     <field name="state" group="True"/>
154                 </graph>
155             </field>
156         </record>
157
158         <!-- Fund Raising Search View -->
159         <record id="view_crm_case_fund_filter" model="ir.ui.view">
160                 <field name="name">CRM - Funds Search</field>
161                 <field name="model">crm.fundraising</field>
162                 <field name="type">search</field>
163                 <field name="arch" type="xml">
164                     <search string="Search Funds">
165                         <group>
166                             <field name="name" string="Fund Description"/>
167                             <separator orientation="vertical" />
168                             <filter icon="terp-check" string="New"
169                                 domain="[('state','=','draft')]" name="current"
170                                 help="New Funds" />
171                             <filter icon="terp-camera_test" string="Open"
172                                 domain="[('state','=','open')]"
173                                 help="Open Funds" />
174                             <filter icon="terp-gtk-media-pause"
175                                 string="Pending"
176                                 domain="[('state','=','pending')]"
177                                 help="Pending Funds" />
178                             <separator orientation="vertical" />
179                             <filter string="Unassigned"
180                                     icon="terp-personal-"
181                                     domain="[('user_id','=', False)]"
182                                     help="Unassigned" />
183                             <filter string="Assigned to Me or to My Sales Team(s)" 
184                                     icon="terp-personal+"
185                                     domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
186                                     help="Fund Raisings that are assigned to me or to one of the sale teams I manage" />
187                             <separator orientation="vertical" />
188                             <field name="state"/>
189                             <field name="user_id" 
190                                 widget="selection"/>
191                             <field name="section_id" widget="selection" string="Sales Team"/>
192                         </group>
193                         <newline/>
194                         <group expand="0" string="Group By...">
195                             <filter string="Partner" icon="terp-partner"
196                                 domain="[]"
197                                 context="{'group_by':'partner_id'}" />
198                             <filter string="Responsible" icon="terp-personal"
199                                 domain="[]"
200                                 context="{'group_by':'user_id'}" />
201                             <filter string="Category" help="Fund Category"
202                                 icon="terp-stock_symbol-selection" domain="[]"
203                                 context="{'group_by':'categ_id'}" />
204                             <filter string="Payment Mode" help="Payment Mode"
205                                 icon="terp-dolar" domain="[]"
206                                 context="{'group_by':'type_id'}" />
207                             <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]"
208                                 context="{'group_by':'state'}" />
209                         </group>
210                     </search>
211                 </field>
212             </record>
213     </data>
214 </openerp>