~openerp-dev/openobject-addons/trunk-event-reports-psa

« back to all changes in this revision

Viewing changes to sale_crm/sale_crm_view.xml

  • Committer: Atul Patel(OpenERP)
  • Date: 2014-05-21 17:18:23 UTC
  • mfrom: (9375.1.87 trunk)
  • Revision ID: atp@tinyerp.com-20140521171823-3zo6f207bfxdl9zg
[MERGE]: Merged with addons

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
            <field name="inherit_id" ref="sale.view_order_form"/>
28
28
            <field name="arch" type="xml">
29
29
                <field name="user_id" position="after">
30
 
                    <field name="section_id" options="{'no_create': True}" groups="base.group_multi_salesteams"/>
31
30
                    <field name="categ_ids" widget="many2many_tags"/>
32
31
                </field>
33
32
            </field>
34
33
        </record>
35
 
 
36
 
        <record id="view_sales_order_filter_inherit" model="ir.ui.view">
37
 
            <field name="name">sale.order.list.select</field>
38
 
            <field name="model">sale.order</field>
39
 
            <field name="inherit_id" ref="sale.view_sales_order_filter"/>
40
 
            <field name="arch" type="xml">
41
 
                <xpath expr="//filter[@name='my_sale_orders_filter']" position="after">
42
 
                    <separator/>
43
 
                    <filter string="My Sales Team(s)"
44
 
                        icon="terp-personal+"
45
 
                        domain="[('section_id.user_id','=',uid)]"
46
 
                        help="My Sales Team(s)"  groups="base.group_multi_salesteams"/>
47
 
                </xpath>
48
 
                <xpath expr="//field[@name='user_id']" position="after">
49
 
                    <field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
50
 
                </xpath>
51
 
            </field>
52
 
        </record>
53
 
 
54
 
        <!-- Update account invoice list view!-->
55
 
        <record model="ir.ui.view" id="account_invoice_tree">
56
 
            <field name="name">Account Invoice</field>
57
 
            <field name="model">account.invoice</field>
58
 
            <field name="inherit_id" ref="account.invoice_tree"/>
59
 
            <field name="arch" type="xml">
60
 
                <data>
61
 
                    <xpath expr="//field[@name='user_id']" position="after">
62
 
                        <field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
63
 
                    </xpath>
64
 
                </data>
65
 
            </field>
66
 
        </record>
67
 
 
68
 
        <!-- Update account invoice search view!-->
69
 
        <record id="account_invoice_groupby_inherit" model="ir.ui.view">
70
 
            <field name="name">account.invoice.groupby</field>
71
 
            <field name="model">account.invoice</field>
72
 
            <field name="inherit_id" ref="account.view_account_invoice_filter"/>
73
 
            <field name="arch" type="xml">
74
 
                <xpath expr="//field[@name='user_id']" position="after">
75
 
                    <field name="section_id"/>
76
 
                </xpath>
77
 
                <xpath expr="//group/filter[@string='Due Month']" position="after">
78
 
                    <filter string="Sales Team" domain="[]" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
79
 
                </xpath>
80
 
            </field>
81
 
        </record>
82
 
 
83
 
        <!-- Update account invoice !-->
84
 
        <record model="ir.ui.view" id="account_invoice_form">
85
 
            <field name="name">Account Invoice</field>
86
 
            <field name="model">account.invoice</field>
87
 
            <field name="inherit_id" ref="account.invoice_form"/>
88
 
            <field name="arch" type="xml">
89
 
                <data>
90
 
                    <xpath expr="//field[@name='user_id']" position="after">
91
 
                        <field name="section_id" groups="base.group_multi_salesteams"/>
92
 
                    </xpath>
93
 
                </data>
94
 
            </field>
95
 
        </record>
96
 
 
97
 
        <!-- Update user form !-->
98
 
        <record model="ir.ui.view" id="res_user_form">
99
 
            <field name="name">Users Preferences</field>
100
 
            <field name="model">res.users</field>
101
 
            <field name="inherit_id" ref="base.view_users_form"/>
102
 
            <field name="arch" type="xml">
103
 
                <data>
104
 
                    <xpath expr="//field[@name='tz']" position="after">
105
 
                        <field name="default_section_id"/>
106
 
                    </xpath>
107
 
                </data>
108
 
            </field>
109
 
        </record>
110
 
 
111
 
        <!-- Update Preferences form !-->
112
 
        <record id="view_users_form_preferences" model="ir.ui.view">
113
 
            <field name="name">res.users.preferences.form</field>
114
 
            <field name="model">res.users</field>
115
 
            <field name="inherit_id" ref="base.view_users_form_simple_modif"/>
116
 
            <field name="arch" type="xml">
117
 
            <data>
118
 
                    <xpath expr="//field[@name='company_id']" position="before">
119
 
                        <field name="default_section_id" readonly="0"/>
120
 
                    </xpath>
121
 
                </data>
122
 
            </field>
123
 
        </record>
124
 
 
125
 
        <!-- search by Salesteams -->
126
 
 
127
 
        <record id="action_orders_salesteams" model="ir.actions.act_window">
128
 
            <field name="name">Sales Orders</field>
129
 
            <field name="type">ir.actions.act_window</field>
130
 
            <field name="res_model">sale.order</field>
131
 
            <field name="view_type">form</field>
132
 
            <field name="view_mode">tree,form,calendar,graph</field>
133
 
            <field name="search_view_id" ref="sale.view_sales_order_filter"/>
134
 
            <field name="domain">[('state','not in',('draft','sent','cancel'))]</field>
135
 
            <field name="context">{
136
 
                    'search_default_section_id': [active_id],
137
 
                    'default_section_id': active_id,
138
 
                }
139
 
            </field>
140
 
            <field name="help" type="html">
141
 
              <p class="oe_view_nocontent_create">
142
 
                Click to create a quotation that can be converted into a sales
143
 
                order.
144
 
              </p><p>
145
 
                OpenERP will help you efficiently handle the complete sales flow:
146
 
                quotation, sales order, delivery, invoicing and payment.
147
 
              </p>
148
 
            </field>
149
 
        </record>
150
 
 
151
 
        <record id="action_quotations_salesteams" model="ir.actions.act_window">
152
 
            <field name="name">Quotations</field>
153
 
            <field name="type">ir.actions.act_window</field>
154
 
            <field name="res_model">sale.order</field>
155
 
            <field name="view_type">form</field>
156
 
            <field name="view_id" ref="sale.view_quotation_tree"/>
157
 
            <field name="view_mode">tree,form,calendar,graph</field>
158
 
            <field name="context">{
159
 
                    'search_default_section_id': [active_id],
160
 
                    'default_section_id': active_id,
161
 
                    'show_address': 1,
162
 
                }
163
 
            </field>
164
 
            <field name="domain">[('state','in',('draft','sent','cancel'))]</field>
165
 
            <field name="search_view_id" ref="sale.view_sales_order_filter"/>
166
 
            <field name="help" type="html">
167
 
              <p class="oe_view_nocontent_create">
168
 
                Click to create a quotation, the first step of a new sale.
169
 
              </p><p>
170
 
                OpenERP will help you handle efficiently the complete sale flow:
171
 
                from the quotation to the sales order, the
172
 
                delivery, the invoicing and the payment collection.
173
 
              </p><p>
174
 
                The social feature helps you organize discussions on each sales
175
 
                order, and allow your customers to keep track of the evolution
176
 
                of the sales order.
177
 
              </p>
178
 
            </field>
179
 
        </record>
180
 
 
181
 
        <record id="action_invoice_salesteams" model="ir.actions.act_window">
182
 
            <field name="name">Invoices</field>
183
 
            <field name="res_model">account.invoice</field>
184
 
            <field name="view_type">form</field>
185
 
            <field name="view_mode">tree,form,calendar,graph</field>
186
 
            <field name="view_id" ref="account.invoice_tree"/>
187
 
            <field name="domain">[
188
 
                ('state', 'not in', ['draft', 'cancel']),
189
 
                ('type', '=', 'out_invoice')]</field>
190
 
            <field name="context">{
191
 
                    'search_default_section_id': [active_id],
192
 
                    'default_section_id': active_id,
193
 
                    'default_type':'out_invoice',
194
 
                    'type':'out_invoice',
195
 
                    'journal_type': 'sale',
196
 
                }
197
 
            </field>
198
 
            <field name="search_view_id" ref="account.view_account_invoice_filter"/>
199
 
        </record>
200
 
 
201
 
        <record id="action_invoice_salesteams_view_tree" model="ir.actions.act_window.view">
202
 
            <field name="sequence">1</field>
203
 
            <field name="view_mode">tree</field>
204
 
            <field name="act_window_id" ref="sale_crm.action_invoice_salesteams"/>
205
 
        </record>
206
 
 
207
 
        <record id="action_invoice_salesteams_view_form" model="ir.actions.act_window.view">
208
 
            <field name="sequence">2</field>
209
 
            <field name="view_mode">form</field>
210
 
            <field name="view_id" ref="account.invoice_form"/>
211
 
            <field name="act_window_id" ref="sale_crm.action_invoice_salesteams"/>
212
 
        </record>
213
 
 
214
 
        <record id="action_order_report_quotation_salesteam" model="ir.actions.act_window">
215
 
            <field name="name">Quotations Analysis</field>
216
 
            <field name="res_model">sale.report</field>
217
 
            <field name="view_mode">graph</field>
218
 
            <field name="domain">[('state','=','draft'),('section_id', '=', active_id)]</field>
219
 
            <field name="context">{'search_default_order_month':1}</field>
220
 
            <field name="help">This report performs analysis on your quotations. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application.</field>
221
 
        </record>
222
 
 
223
 
        <record id="action_order_report_so_salesteam" model="ir.actions.act_window">
224
 
            <field name="name">Sales Analysis</field>
225
 
            <field name="res_model">sale.report</field>
226
 
            <field name="view_mode">graph</field>
227
 
            <field name="domain">[('state','not in',('draft','sent','cancel')),('section_id', '=', active_id)]</field>
228
 
            <field name="context">{'search_default_order_month':1}</field>
229
 
            <field name="help">This report performs analysis on your sales orders. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application.</field>
230
 
        </record>
231
 
 
232
 
        <record id="action_account_invoice_report_salesteam" model="ir.actions.act_window">
233
 
            <field name="name">Invoices Analysis</field>
234
 
            <field name="res_model">account.invoice.report</field>
235
 
            <field name="view_mode">graph</field>
236
 
            <field name="domain">[('section_id', '=', active_id),('state', 'not in', ['draft', 'cancel'])]</field>
237
 
            <field name="context">{'search_default_month':1}</field>
238
 
            <field name="help">From this report, you can have an overview of the amount invoiced to your customer. The tool search can also be used to personalise your Invoices reports and so, match this analysis to your needs.</field>
239
 
        </record>
240
 
 
241
 
        <record id="crm_case_section_salesteams_view_form" model="ir.ui.view">
242
 
            <field name="name">crm.case.section.form</field>
243
 
            <field name="model">crm.case.section</field>
244
 
            <field name="inherit_id" ref="crm.crm_case_section_view_form"/>
245
 
            <field name="arch" type="xml">
246
 
            <data>
247
 
                <xpath expr="//field[@name='code']" position="after">
248
 
                    <field name="invoiced_target"/>
249
 
                    <field name="invoiced_forecast"/>
250
 
                </xpath>
251
 
            </data>
252
 
            </field>
253
 
        </record>
254
 
 
255
 
        <record id="crm_case_section_salesteams_view_kanban" model="ir.ui.view">
256
 
            <field name="name">crm.case.section.kanban</field>
257
 
            <field name="model">crm.case.section</field>
258
 
            <field name="inherit_id" ref="crm.crm_case_section_salesteams_view_kanban"/>
259
 
            <field name="arch" type="xml">
260
 
            <data>
261
 
                <xpath expr="//field[@name='name']" position="after">
262
 
                    <field name="monthly_quoted"/>
263
 
                    <field name="monthly_confirmed"/>
264
 
                    <field name="monthly_invoiced"/>
265
 
                    <field name="invoiced_forecast"/>
266
 
                    <field name="invoiced_target"/>
267
 
                </xpath>
268
 
                <xpath expr="//div[@class='oe_salesteams_leads']" position="after">
269
 
                    <div class="oe_salesteams_orders">
270
 
                        <a name="%(action_orders_salesteams)d" type="action">Sales Orders</a>
271
 
                        <a name="%(action_order_report_so_salesteam)d" type="action" class="oe_sparkline_bar_link">
272
 
                            <field name="monthly_confirmed" widget="sparkline_bar" options="{'delayIn': '3000'}">
273
 
                                Revenue of confirmed sales orders per month.<br/>Click to acces the Sales Analysis.
274
 
                            </field>
275
 
                        </a>
276
 
                    </div>
277
 
                </xpath>
278
 
                <xpath expr="//div[@class='oe_salesteams_opportunities']" position="after">
279
 
                    <div class="oe_salesteams_invoices" groups="account.group_account_invoice">
280
 
                        <a name="%(action_invoice_salesteams)d" type="action">Invoices</a>
281
 
                        <a name="%(action_account_invoice_report_salesteam)d" type="action" class="oe_sparkline_bar_link">
282
 
                            <field name="monthly_invoiced" widget="sparkline_bar" options="{'delayIn': '3000'}">
283
 
                                Revenue of sent invoices per month.<br/>Click to see a detailed analysis of invoices.
284
 
                            </field>
285
 
                        </a>
286
 
                    </div>
287
 
                    <div class="oe_salesteams_quotations">
288
 
                        <a name="%(action_quotations_salesteams)d" type="action" class="oe_sparkline_bar_link">Quotations</a>
289
 
                        <a name="%(action_order_report_quotation_salesteam)d" type="action" class="oe_sparkline_bar_link">
290
 
                            <field name="monthly_quoted" widget="sparkline_bar" options="{'delayIn': '3000'}">
291
 
                                Revenue of created quotations per month.<br/>Click to see a detailed analysis.
292
 
                            </field>
293
 
                        </a>
294
 
                    </div>
295
 
                </xpath>
296
 
                <xpath expr="//div[@class='oe_clear']" position="after">
297
 
                    <div class="oe_center" t-if="record.invoiced_target.raw_value">
298
 
                        <field name="monthly_invoiced" widget="gauge" style="width:160px; height: 120px; cursor: pointer;"
299
 
                            options="{'max_field': 'invoiced_target'}">Invoiced</field>
300
 
                        <field name="invoiced_forecast" widget="gauge" style="width:160px; height: 120px; cursor: pointer;"
301
 
                            options="{'max_field': 'invoiced_target', 'on_change': 'action_forecast'}">Forecast</field>
302
 
                    </div>
303
 
                    <div class="oe_center oe_salesteams_help" style="color:#bbbbbb;" t-if="!record.invoiced_target.raw_value">
304
 
                        <br/>Define an invoicing target in the sales team settings to see the period's achievement and forecast at a glance.
305
 
                    </div>
306
 
                </xpath>
307
 
            </data>
308
 
            </field>
309
 
        </record>
310
34
    </data>
311
35
</openerp>