[IMP] removed same buttons from More button located at top
[odoo/odoo.git] / addons / project_issue / project_issue_view.xml
1 <?xml version="1.0"?>
2 <openerp>
3     <data>
4
5         <menuitem  id="menu_project_confi" name="Issues" parent="base.menu_definitions" sequence="2"/>
6
7         <!-- Project issue Read/Unread actions -->
8         <record id="actions_server_project_issue_unread" model="ir.actions.server">
9             <field name="name">Mark unread</field>
10             <field name="condition">True</field>
11             <field name="type">ir.actions.server</field>
12             <field name="model_id" ref="model_project_issue"/>
13             <field name="state">code</field>
14             <field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
15         </record>
16         <record id="action_project_issue_unread" model="ir.values">
17             <field name="name">action_project_issue_unread</field>
18             <field name="action_id" ref="actions_server_project_issue_unread"/>
19             <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_project_issue_unread'))"/>
20             <field name="key">action</field>
21             <field name="model_id" ref="model_project_issue"/>
22             <field name="model">project.issue</field>
23             <field name="key2">client_action_multi</field>
24         </record>
25
26         <record id="actions_server_project_issue_read" model="ir.actions.server">
27             <field name="name">Mark read</field>
28             <field name="condition">True</field>
29             <field name="type">ir.actions.server</field>
30             <field name="model_id" ref="model_project_issue"/>
31             <field name="state">code</field>
32             <field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
33         </record>
34         <record id="action_project_issue_read" model="ir.values">
35             <field name="name">action_project_issue_read</field>
36             <field name="action_id" ref="actions_server_project_issue_read"/>
37             <field name="value" eval="'ir.actions.server,' + str(ref('actions_server_project_issue_read'))"/>
38             <field name="key">action</field>
39             <field name="model_id" ref="model_project_issue"/>
40             <field name="model">project.issue</field>
41             <field name="key2">client_action_multi</field>
42         </record>
43
44         <record model="ir.ui.view" id="project_issue_version_search_view">
45             <field name="name">Issue Version</field>
46             <field name="model">project.issue.version</field>
47             <field name="arch" type="xml">
48                 <search string="Issue Version">
49                     <field name="name" string="Issue Version"/>
50                     <field name="active"/>
51                 </search>
52             </field>
53         </record>
54         <record model="ir.ui.view" id="project_issue_version_form_view">
55             <field name="name">Issue Version</field>
56             <field name="model">project.issue.version</field>
57             <field name="arch" type="xml">
58                 <form string="Issue Version" version="7.0">
59                     <group col="2">
60                         <field name="name"/>
61                         <field name="active"/>
62                     </group>
63                 </form>
64             </field>
65         </record>
66         <record id="project_issue_version_action" model="ir.actions.act_window">
67             <field name="name">Versions</field>
68             <field name="res_model">project.issue.version</field>
69             <field name="view_type">form</field>
70             <field name="help" type="html">
71               <p class="oe_view_nocontent_create">
72                 Click to add a new version.
73               </p><p>
74                 Define here the different versions of your products on which
75                 you can work on issues.
76               </p>
77             </field>
78         </record>
79         <menuitem action="project_issue_version_action" id="menu_project_issue_version_act" parent="menu_project_confi" groups="base.group_no_one"/>
80
81         <record id="project_issue_categ_action" model="ir.actions.act_window">
82             <field name="name">Issue Categories</field>
83             <field name="res_model">crm.case.categ</field>
84             <field name="view_type">form</field>
85             <field name="view_id" ref="crm.crm_case_categ_tree-view"/>
86             <field name="domain">[('object_id.model', '=', 'project.issue')]</field>
87             <field name="context" eval="{'object_id': ref('model_project_issue')}"/>
88         </record>
89
90         <menuitem action="project_issue_categ_action" name="Categories" id="menu_project_issue_category_act" parent="menu_project_confi" groups="base.group_no_one"/>
91
92         <record model="ir.ui.view" id="project_issue_form_view">
93             <field name="name">Project Issue Tracker Form</field>
94             <field name="model">project.issue</field>
95             <field name="arch" type="xml">
96                 <form string="Issue" version="7.0">
97                 <header>
98                     <span groups="base.group_user">
99                         <button name="case_close" string="Done" type="object"
100                                 states="open"/>
101                          <button name="case_close" string="Done" type="object"
102                                 states="draft,pending"/>
103                         <button name="case_escalate" string="Escalate" type="object"
104                                 states="draft,open,pending"/>
105                         <button name="case_cancel" string="Cancel" type="object"
106                                 states="draft,open,pending"/>
107                     </span>
108                     <field name="stage_id" widget="statusbar" clickable="True"/>
109                 </header>
110                 <sheet string="Issue">
111                     <label for="name" class="oe_edit_only"/>
112                     <h1><field name="name"/></h1>
113                     <group>
114                         <group>
115                             <field name="user_id"/>
116                             <field name="partner_id"  on_change="onchange_partner_id(partner_id, email_from)"/>
117                             <field name="email_from"/>
118                         </group>
119                         <group>
120                             <field name="priority"/>
121                             <field name="project_id" required="True" on_change="on_change_project(project_id)" context="{'default_use_issues':1}"/>
122                             <label for="task_id"/>
123                             <div>
124                                 <field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/>
125                                 <field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}" class="oe_inline"/>
126                             </div>
127                             <field name="categ_ids" widget="many2many_tags"/>
128                         </group>
129                     </group>
130                     <notebook>
131                         <page string="Description">
132                             <group>
133                                 <group>
134                                     <field name="version_id" widget="selection"/>
135                                 </group>
136                             </group>
137                             <field name="description" placeholder="Add a description..."/>
138                         </page>
139                         <page string="Extra Info" groups="base.group_no_one">
140                             <group col="4" colspan="4">
141                                 <separator string="Statistics" colspan="4" col="4"/>
142                                 <field name="day_open"/>
143                                 <field name="day_close"/>
144                                 <field name="working_hours_open" widget="float_time"/>
145                                 <field name="working_hours_close" widget="float_time"/>
146                                 <field name="inactivity_days"/>
147                                 <field name="days_since_creation"/>
148                             </group>
149                             <group colspan="4" col="4">
150                                 <separator string="References" colspan="4"/>
151                                 <field name="id"/>
152                                 <field name="active"/>
153                             </group>
154                             <group colspan="4" col="4" invisible="1">
155                                 <separator string="Status" colspan="4"/>
156                                 <field name="state" groups="base.group_no_one" string="Status"/>
157                             </group>
158                         </page>
159                     </notebook>
160                 </sheet>
161                 <div class="oe_chatter">
162                     <field name="message_ids" widget="mail_thread"/>
163                     <field name="message_follower_ids" widget="mail_followers"/>
164                 </div>
165                 </form>
166             </field>
167         </record>
168
169         <record model="ir.ui.view" id="project_issue_tree_view">
170             <field name="name">Project Issue Tracker Tree</field>
171             <field name="model">project.issue</field>
172             <field name="arch" type="xml">
173                 <tree string="Issue Tracker Tree" fonts="bold:message_unread==True" colors="black:state=='open';blue:state=='pending';grey:state in ('cancel', 'done')">
174                     <field name="message_unread" invisible="1"/>
175                     <field name="id"/>
176                     <field name="create_date" groups="base.group_no_one"/>
177                     <field name="name"/>
178                     <field name="partner_id"/>
179                     <field name="project_id"/>
180                     <field name="priority" string="Priority" groups="base.group_user"/>
181                     <field name="version_id" widget="selection"/>
182                     <field name="user_id"/>
183                     <field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
184                     <field name="stage_id" widget="selection" readonly="1"/>
185                     <field name="state" invisible="1"/>
186                     <field name="categ_ids" invisible="1"/>
187                     <field name="task_id" invisible="1"/>
188                 </tree>
189             </field>
190         </record>
191
192         <record id="view_project_issue_filter" model="ir.ui.view">
193             <field name="name">Project Issue Tracker Search</field>
194             <field name="model">project.issue</field>
195             <field name="arch" type="xml">
196                 <search string="Issue Tracker Search">
197                     <field name="name" string="Issue" filter_domain="['|', '|',('partner_id','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
198                     <field name="id"/>
199                     <filter icon="terp-mail-message-new" string="Inbox" help="Unread messages" name="message_unread" domain="[('message_unread','=',True)]"/>
200                     <separator/>
201                     <filter string="New" icon="terp-document-new" domain="[('state','=','draft')]" help="New Issues"/>
202                     <filter string="To Do" domain="[('state','=','open')]" help="To Do Issues" icon="terp-check"/>
203                     <separator/>
204                     <filter string="Unassigned Issues" domain="[('user_id','=',False)]"  help="Unassigned Issues" icon="terp-personal-" />
205                     <field name="user_id"/>
206                     <field name="project_id"/>
207                     <group expand="0" string="Group By..." >
208                         <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
209                         <filter string="Contact" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
210                         <filter string="Project"  icon="terp-folder-violet" domain="[]" context="{'group_by':'project_id'}"/>
211                         <filter string="Version" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'version_id'}"/>
212                         <filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}"/>
213                         <filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}"/>
214                         <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
215                         <filter string="Month" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" help="Creation Month"/>
216                     </group>
217                 </search>
218             </field>
219         </record>
220
221         <record model="ir.ui.view" id="project_issue_calendar_view">
222             <field name="name">Project Issue Tracker Calendar</field>
223             <field name="model">project.issue</field>
224             <field name="priority" eval="2"/>
225             <field name="arch" type="xml">
226                 <calendar string="Issues" date_start="date" color="user_id" date_delay="duration">
227                     <field name="name"/>
228                     <field name="partner_id"/>
229                 </calendar>
230             </field>
231         </record>
232
233
234         <!-- Project Issue Karban View-->
235
236         <record model="ir.ui.view" id="project_issue_kanban_view">
237             <field name="name">Project Issue Kanban</field>
238             <field name="model">project.issue</field>
239             <field name="arch" type="xml">
240                 <kanban default_group_by="stage_id">
241                     <field name="stage_id"/>
242                     <field name="color"/>
243                     <field name="priority"/>
244                     <field name="user_email"/>
245                     <field name="user_id"/>
246                     <field name="date_deadline"/>
247                     <templates>
248                         <t t-name="kanban-tooltip">
249                            <ul class="oe_kanban_tooltip">
250                               <li><b>Project:</b> <field name="project_id"/></li>
251                               <li><b>Category:</b> <field name="categ_ids"/></li>
252                            </ul>
253                         </t>
254                         <t t-name="kanban-box">
255                             <div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_semantic_html_override">
256                                 <div class="oe_dropdown_toggle oe_dropdown_kanban">
257                                     <span class="oe_e">i</span>
258                                     <ul class="oe_dropdown_menu">
259                                         <t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit...</a></li></t>
260                                         <t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
261                                         <li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
262                                     </ul>
263                                 </div>
264                                 <div class="oe_kanban_content" tooltip="kanban-tooltip">
265                                     <div>
266                                         <b><field name="name"/></b> <br/>
267                                         <field name="partner_id"/> <br/>
268                                         <field name="version_id"/>
269                                     </div>
270                                     <div class="oe_kanban_footer_left">
271                                         <div class="oe_left oe_tags">
272                                             <field name="categ_ids"/>
273                                         </div>
274                                         <div class="oe_right">
275                                             <span class="oe_kanban_highlight">
276                                                 <t t-set="priority" t-value="record.priority.raw_value || 5"/>
277                                                 <a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority">
278                                                    <img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
279                                                 </a>
280                                                 <a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority">
281                                                    <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
282                                                 </a>
283                                                 <a type="object" name="set_priority" args="['2']" title="High Priority">
284                                                    <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
285                                                 </a>
286                                                 <a type="object" name="set_priority" args="['1']" title="Highest Priority">
287                                                    <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
288                                                 </a>
289                                             </span>
290                                             <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())">
291                                                 <span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span>
292                                             </t>
293                                             <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"/>
294                                         </div>
295                                     </div>
296                                 </div>
297                                 <div class="oe_clear"></div>
298                             </div>
299                         </t>
300                     </templates>
301                 </kanban>
302             </field>
303         </record>
304
305
306         <!-- Feature Requests -->
307         <record model="ir.ui.view" id="project_feature_tree_view">
308             <field name="name">Project Issue- Feature Tracker Tree</field>
309             <field name="model">project.issue</field>
310             <field name="arch" type="xml">
311                 <tree string="Feature Tracker Tree" fonts="bold:message_unread==True" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
312                     <field name="id"/>
313                     <field name="message_unread" invisible="1"/>
314                     <field name="name" string="Feature description"/>
315                     <field name="partner_id"/>
316                     <field name="priority" string="Priority"/>
317                     <field name="version_id"/>
318                     <field name="user_id"/>
319                     <field name="stage_id" widget="selection" readonly="1"/>
320                     <field name="state" groups="base.group_no_one"/>
321                 </tree>
322             </field>
323         </record>
324
325         <record id="view_project_feature_filter" model="ir.ui.view">
326             <field name="name">Project Issue - Feature Tracker Search</field>
327             <field name="model">project.issue</field>
328             <field name="arch" type="xml">
329                 <search string="Feature Tracker Search">
330                     <field name="name" string="Feature description"/>
331                     <field name="date"/>
332                     <field name="state" groups="base.group_no_one"/>
333                     <filter icon="terp-check" domain="[('state','in',('open','draft'))]" help="Current Features" name="current_feature"/>
334                     <filter icon="terp-camera_test" domain="[('state','=','open')]" help="Open Features"/>
335                     <field name="user_id"/>
336                     <field name="project_id" string="Project"/>
337                 </search>
338             </field>
339         </record>
340
341         <record id="act_project_project_2_project_issue_all" model="ir.actions.act_window">
342             <field name="res_model">project.issue</field>
343             <field name="view_type">form</field>
344             <field name="view_mode">kanban,tree,form,calendar,graph</field>
345             <field name="context">{'search_default_project_id': [active_id], 'default_project_id': active_id}</field>
346         </record>
347
348         <!-- Project -->
349         <record id="view_project_form_inherited" model="ir.ui.view">
350             <field name="name">project.project.form.inherited</field>
351             <field name="model">project.project</field>
352             <field name="inherit_id" ref="project.edit_project"/>
353             <field name="arch" type="xml">
354                 <xpath expr='//div[@name="options_active"]' position='inside'>
355                     <field name="use_issues" class="oe_inline"/>
356                     <label for="use_issues"/>
357                 </xpath>
358                 <xpath expr='//div[@name="buttons"]' position='inside'>
359                     <button name="%(act_project_project_2_project_issue_all)d" string="Issues" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"/>
360                 </xpath>
361                 <field name="priority" position="before">
362                     <field name="project_escalation_id"/>
363                 </field>
364                 <field name="alias_domain" position="after">
365                     <label for="alias_model" class="oe_edit_only" string="creates"/><field name="alias_model" class="oe_edit_only oe_inline"/>
366                 </field>
367             </field>
368        </record>
369
370         <record id="view_project_kanban_inherited" model="ir.ui.view">
371             <field name="name">project.project.kanban.inherited</field>
372             <field name="model">project.project</field>
373             <field name="inherit_id" ref="project.view_project_kanban"/>
374             <field name="arch" type="xml">
375                 <field name="use_tasks" position="after">
376                     <field name="use_issues"/>
377                     <field name="issue_count" invisible="1"/>
378                 </field>
379                 <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
380                     <a t-if="record.use_issues.raw_value"
381                         name="%(act_project_project_2_project_issue_all)d" type="action">
382                         <field name="issue_count"/> Issues</a>
383                 </xpath>
384             </field>
385         </record>
386
387         <record id="analytic_account_inherited_issue_form" model="ir.ui.view">
388             <field name="name">account.analytic.account.issue.form.inherit</field>
389             <field name="model">account.analytic.account</field>
390             <field name="inherit_id" ref="project.analytic_account_inherited_form"/>
391             <field eval="18" name="priority"/>
392             <field name="arch" type="xml">
393                 <xpath expr='//div[@name="project"]' position='inside'>
394                     <field name="use_issues"/>
395                     <label for="use_issues"/>
396                 </xpath>
397             </field>
398         </record>
399
400     </data>
401 </openerp>