04c2f54531f31e583834aa1022d8f617f090c794
[odoo/odoo.git] / addons / project_issue / project_issue_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4
5
6         <record model="ir.ui.view" id="project_issue_version_search_view">
7             <field name="name">Issue Version</field>
8             <field name="model">project.issue.version</field>
9             <field name="arch" type="xml">
10                 <search string="Issue Version">
11                     <field name="name" string="Issue Version"/>
12                     <field name="active"/>
13                 </search>
14             </field>
15         </record>
16         <record model="ir.ui.view" id="project_issue_version_form_view">
17             <field name="name">Issue Version</field>
18             <field name="model">project.issue.version</field>
19             <field name="arch" type="xml">
20                 <form string="Issue Version">
21                     <group col="2">
22                         <field name="name"/>
23                         <field name="active"/>
24                     </group>
25                 </form>
26             </field>
27         </record>
28         <record id="project_issue_version_action" model="ir.actions.act_window">
29             <field name="name">Versions</field>
30             <field name="res_model">project.issue.version</field>
31             <field name="view_type">form</field>
32             <field name="help" type="html">
33               <p class="oe_view_nocontent_create">
34                 Click to add a new version.
35               </p><p>
36                 Define here the different versions of your products on which
37                 you can work on issues.
38               </p>
39             </field>
40         </record>
41
42         <menuitem  action="project_issue_version_action" id="menu_project_confi" name="Issues Versions" parent="base.menu_definitions" sequence="2"/>
43
44
45         <record model="ir.ui.view" id="project_issue_form_view">
46             <field name="name">Project Issue Tracker Form</field>
47             <field name="model">project.issue</field>
48             <field name="arch" type="xml">
49                 <form string="Issue">
50                 <header>
51                     <field name="stage_id" widget="statusbar" clickable="True"
52                         options="{'fold_field': 'fold'}"/>
53                 </header>
54                 <sheet string="Issue">
55                     <label for="name" class="oe_edit_only"/>
56                     <div class="row">
57                         <h1 class="col-xs-11">
58                             <field name="name" class="oe_inline"/>
59                         </h1>
60                         <div class="col-xs-1 text-right">
61                             <field name="kanban_state" class="oe_inline" widget="kanban_state_selection"/>
62                         </div>
63                     </div>
64                     <label for="categ_ids" class="oe_edit_only"/>
65                     <field name="categ_ids" widget="many2many_tags"/>
66                     <group>
67                         <group>
68                             <field name="user_id"
69                                 context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_user']}"/>
70                             <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
71                             <field name="email_from"/>
72                             <label for="project_id"/>
73                             <div>
74                                 <field name="project_id" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/>
75                                 <field name="can_escalate" invisible="1"/>
76                                 <button name="case_escalate" string="Escalate" type="object" class="oe_link" attrs="{'invisible':[('can_escalate','=',False)]}" groups="base.group_user"/>
77                             </div>
78                         </group>
79                         <group>
80                             <field name="id"/>
81                             <field name="version_id" groups="base.group_user"/>
82                             <field name="priority" groups="base.group_user" widget="priority"/>
83                             <label for="task_id" groups="base.group_user"/>
84                             <div groups="base.group_user">
85                                 <field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/>
86                                 <field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}" class="oe_inline"/>
87                             </div>
88                         </group>
89                     </group>
90                     <notebook>
91                         <page string="Description">
92                             <field name="description" placeholder="Add an internal note..." groups="base.group_user"/>
93                         </page>
94                         <page string="Extra Info" groups="project.group_project_manager,project.group_project_user">
95                             <group>
96                                 <group string="Statistics">
97                                     <field name="day_open"/>
98                                     <field name="day_close"/>
99                                     <field name="working_hours_open" widget="float_time"/>
100                                     <field name="working_hours_close" widget="float_time"/>
101                                     <field name="inactivity_days"/>
102                                     <field name="days_since_creation"/>
103                                 </group>
104                                 <group string="Status" groups="base.group_no_one">
105                                     <field name="active"/>
106                                 </group>
107                             </group>
108                         </page>
109                     </notebook>
110                 </sheet>
111                 <div class="oe_chatter">
112                     <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
113                     <field name="message_ids" widget="mail_thread"/>
114                 </div>
115                 </form>
116             </field>
117         </record>
118
119         <record model="ir.ui.view" id="project_issue_tree_view">
120             <field name="name">Project Issue Tracker Tree</field>
121             <field name="model">project.issue</field>
122             <field name="arch" type="xml">
123                 <tree string="Issue Tracker Tree" fonts="bold:message_unread==True">
124                     <field name="message_unread" invisible="1"/>
125                     <field name="id"/>
126                     <field name="name"/>
127                     <field name="partner_id"/>
128                     <field name="project_id"/>
129                     <field name="priority" string="Priority" groups="base.group_user"/>
130                     <field name="create_date"/>
131                     <field name="version_id" widget="selection"/>
132                     <field name="user_id"/>
133                     <field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
134                     <field name="stage_id" widget="selection" readonly="1"/>
135                     <field name="categ_ids" invisible="1"/>
136                     <field name="task_id" invisible="1"/>
137                 </tree>
138             </field>
139         </record>
140
141         <record id="view_project_issue_filter" model="ir.ui.view">
142             <field name="name">Project Issue Tracker Search</field>
143             <field name="model">project.issue</field>
144             <field name="arch" type="xml">
145                 <search string="Issue Tracker Search">
146                     <field name="name" string="Issue" filter_domain="['|', '|', '|', ('partner_id','child_of',self), ('description','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
147                     <field name="id"/>
148                     <field name="partner_id" operator="child_of"/>
149                     <field name="user_id"/>
150                     <field name="project_id"/>
151                     <field name="categ_ids"/>
152                     <field name="stage_id" domain="[]"/>
153                     <filter string="My Issues" domain="[('user_id','=',uid)]"/>
154                     <filter string="Unassigned" name="unassigned" domain="[('user_id', '=', False)]"/>
155                     <separator/>
156                     <filter string="New" name="draft" domain="[('stage_id.sequence', '=', 1)]"/>
157                     <separator/>
158                     <filter string="New Mail" name="message_unread" domain="[('message_unread','=',True)]"/>
159                     <group expand="0" string="Group By" >
160                         <filter string="Assigned to" name="Responsible" context="{'group_by':'user_id'}" />
161                         <filter string="Project" name="project" context="{'group_by':'project_id'}" />
162                         <filter string="Task" context="{'group_by':'task_id'}"/>
163                         <filter string="Priority" context="{'group_by':'priority'}" />
164                         <filter string="Stage" context="{'group_by':'stage_id'}"/>
165                         <filter string="Company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
166                         <separator/>
167                         <filter string="Create Day" context="{'group_by':'create_date:day'}" help="Create Date"/>
168                         <filter string="Last Message" name="group_message_last_post" context="{'group_by':'message_last_post:week'}"/>
169                     </group>
170                 </search>
171             </field>
172         </record>
173
174         <record model="ir.ui.view" id="project_issue_calendar_view">
175             <field name="name">Project Issue Tracker Calendar</field>
176             <field name="model">project.issue</field>
177             <field name="priority" eval="2"/>
178             <field name="arch" type="xml">
179                 <calendar string="Issues" date_start="date" color="user_id" date_delay="duration">
180                     <field name="name"/>
181                     <field name="partner_id"/>
182                 </calendar>
183             </field>
184         </record>
185
186
187         <!-- Project Issue Karban View-->
188
189         <record model="ir.ui.view" id="project_issue_kanban_view">
190             <field name="name">Project Issue Kanban</field>
191             <field name="model">project.issue</field>
192             <field name="arch" type="xml">
193                 <kanban default_group_by="stage_id">
194                     <field name="stage_id"/>
195                     <field name="color"/>
196                     <field name="priority"/>
197                     <field name="user_email"/>
198                     <field name="user_id"/>
199                     <field name="date_deadline"/>
200                     <field name="kanban_state"/>
201                     <field name="message_summary"/>
202                     <templates>
203                         <t t-name="kanban-tooltip">
204                            <ul class="oe_kanban_tooltip">
205                               <li><b>Project:</b> <field name="project_id"/></li>
206                               <li><b>Category:</b> <field name="categ_ids"/></li>
207                            </ul>
208                         </t>
209                         <t t-name="kanban-box">
210                             <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_semantic_html_override">
211                                 <div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
212                                     <span class="oe_e">i</span>
213                                     <ul class="oe_dropdown_menu">
214                                         <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
215                                         <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
216                                         <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
217                                     </ul>
218                                 </div>
219                                 <div class="oe_kanban_content" tooltip="kanban-tooltip">
220                                     <div>
221                                         <b><field name="name"/></b> <br/>
222                                         <field name="partner_id"/> <br/>
223                                         <field name="version_id"/>
224                                     </div>
225                                     <div class="oe_kanban_bottom_right">
226                                         <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/>
227                                         <div class="pull-left" groups="base.group_user">
228                                             <field name="kanban_state" widget="kanban_state_selection"/>
229                                             <field name="priority" widget="priority"/>
230                                         </div>
231                                     </div>
232                                     <div class="oe_kanban_footer_left">
233                                         <field name="categ_ids"/>
234                                         <t t-raw="record.message_summary.raw_value"/>
235                                     </div>
236                                 </div>
237                                 <div class="oe_clear"></div>
238                             </div>
239                         </t>
240                     </templates>
241                 </kanban>
242             </field>
243         </record>
244
245         <record model="ir.ui.view" id="project_issue_graph_view">
246             <field name="name">Project Issue Tracker Graph</field>
247             <field name="model">project.issue</field>
248             <field name="arch" type="xml">
249                 <graph string="Project Issues" type="bar">
250                     <field name="project_id" type="row"/>
251                     <field name="create_date" interval="month" type="col"/>
252                 </graph>
253             </field>
254         </record>
255
256
257         <!-- Feature Requests -->
258         <record model="ir.ui.view" id="project_feature_tree_view">
259             <field name="name">Project Issue- Feature Tracker Tree</field>
260             <field name="model">project.issue</field>
261             <field name="arch" type="xml">
262                 <tree string="Feature Tracker Tree" fonts="bold:message_unread==True">
263                     <field name="id"/>
264                     <field name="message_unread" invisible="1"/>
265                     <field name="name" string="Feature description"/>
266                     <field name="partner_id"/>
267                     <field name="priority" string="Priority"/>
268                     <field name="version_id"/>
269                     <field name="user_id"/>
270                     <field name="stage_id" widget="selection" readonly="1"/>
271                 </tree>
272             </field>
273         </record>
274
275         <record id="act_project_project_2_project_issue_all" model="ir.actions.act_window">
276             <field name="res_model">project.issue</field>
277             <field name="view_type">form</field>
278             <field name="name">Issues</field>
279             <field name="view_mode">kanban,tree,form,calendar,graph</field>
280             <field name="context">{
281                     'search_default_project_id': [active_id],
282                     'default_project_id': active_id,
283                 }
284             </field>
285             <field name="help" type="html">
286                 <p>
287                     The Odoo issues tacker allows you to efficiently manage things
288                     like internal requests, software development bugs, customer
289                     complaints, project troubles, material breakdowns, etc.
290                 </p>
291             </field>
292         </record>
293
294         <!-- Project -->
295         <record id="view_project_form_inherited" model="ir.ui.view">
296             <field name="name">project.project.form.inherited</field>
297             <field name="model">project.project</field>
298             <field name="inherit_id" ref="project.edit_project"/>
299             <field name="arch" type="xml">
300                 <xpath expr='//div[@name="options_active"]' position="attributes">
301                     <attribute name="invisible">0</attribute>
302                 </xpath>
303                 <xpath expr='//div[@name="options_active"]' position='inside'>
304                     <field name="use_issues" class="oe_inline"
305                             on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/>
306                     <label for="use_issues"/>
307                 </xpath>
308                 <xpath expr='//div[@name="buttons"]' position='inside'>
309                     <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_issues','=', False)]}"
310                         name="%(act_project_project_2_project_issue_all)d" icon="fa-bug">
311                         <field string="Issues" name="issue_count" widget="statinfo"/>
312                     </button>
313                 </xpath>
314                 <xpath expr='//page[@name="project_stages"]' position="attributes">
315                     <attribute name="attrs">{'invisible': [('use_tasks', '=', False),('use_issues','=',False)]}</attribute>
316                 </xpath>
317                 <xpath expr='//field[@name="use_tasks"]' position="attributes">
318                     <attribute name="attrs">{'on_change': 'on_change_use_tasks_or_issues(use_tasks, use_issues)'}</attribute>
319                 </xpath>
320                 <field name="sequence" position="before">
321                     <field name="project_escalation_id"/>
322                 </field>
323             </field>
324        </record>
325
326         <record id="view_project_kanban_inherited" model="ir.ui.view">
327             <field name="name">project.project.kanban.inherited</field>
328             <field name="model">project.project</field>
329             <field name="inherit_id" ref="project.view_project_kanban"/>
330             <field name="arch" type="xml">
331                 <field name="use_tasks" position="after">
332                     <field name="use_issues"/>
333                     <field name="issue_ids" invisible="1"/>
334                 </field>
335                 <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/a" position="after">
336                     <a t-if="record.use_issues.raw_value" style="margin-right: 20px" class="pull-right"
337                         name="%(act_project_project_2_project_issue_all)d" type="action">
338                         <t t-raw="record.issue_ids.raw_value.length"/> Issues
339                         <field name="monthly_issues" widget="sparkline_bar" options="{'delayIn': '1000'}">
340                             Closed Issues
341                         </field>
342                     </a>
343                 </xpath>
344                 <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]/div" position="replace">
345                      <div t-if="!(record.use_tasks.raw_value and record.task_count.raw_value gt 0) and !(record.use_issues.raw_value and record.issue_ids.raw_value.length gt 0)" style="margin-top: 6px;margin-left:20px;">
346                          <img src="/project/static/src/img/top_left_arrow.png" style="margin-top: -8px; width: 22px;" />
347                          <span>No activity yet, click to enter in the project.</span>
348                      </div>
349                 </xpath>
350             </field>
351         </record>
352
353         <record id="analytic_account_inherited_issue_form" model="ir.ui.view">
354             <field name="name">account.analytic.account.issue.form.inherit</field>
355             <field name="model">account.analytic.account</field>
356             <field name="inherit_id" ref="project.analytic_account_inherited_form"/>
357             <field eval="18" name="priority"/>
358             <field name="arch" type="xml">
359                 <xpath expr='//div[@name="project"]' position='inside'>
360                     <field name="use_issues"/>
361                     <label for="use_issues"/>
362                 </xpath>
363             </field>
364         </record>
365
366         <record id="action_view_issues" model="ir.actions.act_window">
367             <field name="res_model">project.issue</field>
368             <field name="view_type">form</field>
369             <field name="name">Issues</field>
370             <field name="view_mode">kanban,tree,form,calendar,graph</field>
371             <field name="help" type="html">
372                 <p>
373                     The Odoo issues tacker allows you to efficiently manage things
374                     like internal requests, software development bugs, customer
375                     complaints, project troubles, material breakdowns, etc.
376                 </p>
377             </field>
378         </record>
379
380         <!-- res.partner -->
381         <record model="ir.ui.view" id="res_partner_issues_button_view">
382             <field name="name">res.partner.issues.button.view</field>
383             <field name="model">res.partner</field>
384             <field name="inherit_id" ref="base.view_partner_form" />
385             <field name="priority" eval="50"/>
386             <field name="arch" type="xml">
387                 <xpath expr="//div[@name='buttons']" position="inside">
388                     <button class="oe_inline oe_stat_button" type="action" name="%(action_view_issues)d"
389                         context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}"
390                         attrs="{'invisible': [('customer', '=', False)]}"
391                         icon="fa-bug" groups="project.group_project_user">
392                         <field  string="Issues" name="issue_count" widget="statinfo"/>
393                     </button>
394
395
396                 </xpath>
397             </field>
398         </record>
399
400     </data>
401 </openerp>