Merge lp:~openerp-dev/openobject-addons/trunk-customizetooltips-mba into lp:openobject-addons

Proposed by Mahendra Barad(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-customizetooltips-mba
Merge into: lp:openobject-addons
Diff against target: 769 lines (+299/-34)
17 files modified
crm/crm.py (+25/-0)
crm/crm_lead.py (+1/-0)
crm/crm_lead_data.xml (+25/-0)
crm/crm_lead_view.xml (+2/-2)
crm/crm_view.xml (+24/-0)
hr_recruitment/hr_recruitment.py (+26/-0)
hr_recruitment/hr_recruitment_data.xml (+24/-0)
hr_recruitment/hr_recruitment_view.xml (+23/-1)
project/project.py (+36/-2)
project/project_data.xml (+27/-0)
project/project_demo.xml (+3/-0)
project/project_view.xml (+46/-14)
project/static/src/js/project.js (+10/-0)
project_issue/project_issue.py (+5/-1)
project_issue/project_issue_demo.xml (+3/-0)
project_issue/project_issue_view.xml (+18/-13)
project_timesheet/project_timesheet_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-customizetooltips-mba
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+218942@code.launchpad.net

Description of the change

Hello,
[ADD]tooltip on kanban header and on priority and kanbanselection widget.
Thanks

To post a comment you must log in.
9433. By Mahendra Barad(OpenERP)

[IMP]typo and view of stage

9434. By Mahendra Barad(OpenERP)

[IMP]improve code for widget statinfo

9435. By Mahendra Barad(OpenERP)

[Merge]with trunk

9436. By Mahendra Barad(OpenERP)

[Merge]with trunk

9437. By Mahendra Barad(OpenERP)

[Merge]with trunk

Unmerged revisions

9437. By Mahendra Barad(OpenERP)

[Merge]with trunk

9436. By Mahendra Barad(OpenERP)

[Merge]with trunk

9435. By Mahendra Barad(OpenERP)

[Merge]with trunk

9434. By Mahendra Barad(OpenERP)

[IMP]improve code for widget statinfo

9433. By Mahendra Barad(OpenERP)

[IMP]typo and view of stage

9432. By Mahendra Barad(OpenERP)

[IMp]view of stages in project,crm,hr_recuitment

9431. By Mahendra Barad(OpenERP)

[IMP]button to display task and issue label

9430. By Mahendra Barad(OpenERP)

[IMP]tooltip on kanban header and add feature to add tooltip for the particular star and kanban state selection

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'crm/crm.py'
2--- crm/crm.py 2014-05-14 15:21:54 +0000
3+++ crm/crm.py 2014-05-20 11:07:39 +0000
4@@ -58,6 +58,26 @@
5 _rec_name = 'name'
6 _order = "sequence"
7
8+ def _get_tooltips(self, cr, uid, ids, field, args, context=None):
9+ res = {}
10+ for rec in self.read(cr, uid, ids, ['legend_star1','legend_star2','legend_star3','legend_star4','requirements'], context=context):
11+ value = ""
12+ img = "<img src='/web/static/src/img/icons/star-on.png'/>"
13+ if rec['legend_star1']:
14+ value += img +' '+ rec['legend_star1'] + "<br/>"
15+ if rec['legend_star2']:
16+ value += img + img +' '+ rec['legend_star2'] + "<br/>"
17+ if rec['legend_star3']:
18+ value += img + img + img +' '+ rec['legend_star3'] + "<br/>"
19+ if rec['legend_star4']:
20+ value += img + img + img + img +' '+ rec['legend_star4'] + "<br/>"
21+ if rec['requirements']:
22+ value += rec['requirements']
23+ tooltip = {'tooltip': value}
24+ tooltip.update(rec)
25+ res[rec['id']] = tooltip
26+ return res
27+
28 _columns = {
29 'name': fields.char('Stage Name', size=64, required=True, translate=True),
30 'sequence': fields.integer('Sequence', help="Used to order stages. Lower is better."),
31@@ -76,6 +96,11 @@
32 ('both', 'Both')],
33 string='Type', size=16, required=True,
34 help="This field is used to distinguish stages related to Leads from stages related to Opportunities, or to specify stages available for both types."),
35+ 'kanban_column_tooltip': fields.function(_get_tooltips, string='Tooltips', type="char", help="This tooltips will display on kanban stage header" ),
36+ 'legend_star1':fields.char('Legend Star', help='This tooltip will appear on kanban view column header.'),
37+ 'legend_star2':fields.char('Legend Star2', help='This tooltip will appear on kanban view column header.'),
38+ 'legend_star3':fields.char('Legend Star3', help='This tooltip will appear on kanban view column header.'),
39+ 'legend_star4':fields.char('Legend Star4', help='This tooltip will appear on kanban view column header.'),
40 }
41
42 _defaults = {
43
44=== modified file 'crm/crm_lead.py'
45--- crm/crm_lead.py 2014-05-12 11:41:49 +0000
46+++ crm/crm_lead.py 2014-05-20 11:07:39 +0000
47@@ -279,6 +279,7 @@
48 'partner_address_name': fields.related('partner_id', 'name', type='char', string='Partner Contact Name', readonly=True),
49 'partner_address_email': fields.related('partner_id', 'email', type='char', string='Partner Contact Email', readonly=True),
50 'company_currency': fields.related('company_id', 'currency_id', type='many2one', string='Currency', readonly=True, relation="res.currency"),
51+ 'company_currency_symbol': fields.related('company_id', 'currency_id', 'symbol', type='char', string='Symbol', readonly=True, relation="res.currency"),
52 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True),
53 'user_login': fields.related('user_id', 'login', type='char', string='User Login', readonly=True),
54
55
56=== modified file 'crm/crm_lead_data.xml'
57--- crm/crm_lead_data.xml 2014-05-12 08:37:47 +0000
58+++ crm/crm_lead_data.xml 2014-05-20 11:07:39 +0000
59@@ -10,7 +10,12 @@
60 <field name="on_change">1</field>
61 <field name="sequence">1</field>
62 <field name="type">both</field>
63+ <field name="legend_star1">Low priority</field>
64+ <field name="legend_star2">Normal priority</field>
65+ <field name="legend_star3">High priority</field>
66+ <field name="legend_star4">Highest priority</field>
67 </record>
68+
69 <record model="crm.case.stage" id="stage_lead2">
70 <field name="name">Dead</field>
71 <field name="case_default">1</field>
72@@ -27,6 +32,10 @@
73 <field name="on_change">1</field>
74 <field name="sequence">40</field>
75 <field name="type">opportunity</field>
76+ <field name="legend_star1">Low priority</field>
77+ <field name="legend_star2">Normal priority</field>
78+ <field name="legend_star3">High priority</field>
79+ <field name="legend_star4">Highest priority</field>
80 </record>
81 <record model="crm.case.stage" id="stage_lead4">
82 <field name="name">Proposition</field>
83@@ -34,6 +43,10 @@
84 <field name="probability">40</field>
85 <field name="sequence">50</field>
86 <field name="type">opportunity</field>
87+ <field name="legend_star1">Low priority</field>
88+ <field name="legend_star2">Normal priority</field>
89+ <field name="legend_star3">High priority</field>
90+ <field name="legend_star4">Highest priority</field>
91 </record>
92 <record model="crm.case.stage" id="stage_lead5">
93 <field name="name">Negotiation</field>
94@@ -41,6 +54,10 @@
95 <field name="probability">60</field>
96 <field name="sequence">60</field>
97 <field name="type">opportunity</field>
98+ <field name="legend_star1">Low priority</field>
99+ <field name="legend_star2">Normal priority</field>
100+ <field name="legend_star3">High priority</field>
101+ <field name="legend_star4">Highest priority</field>
102 </record>
103 <record model="crm.case.stage" id="stage_lead6">
104 <field name="name">Won</field>
105@@ -50,6 +67,10 @@
106 <field name="on_change">1</field>
107 <field name="sequence">70</field>
108 <field name="type">opportunity</field>
109+ <field name="legend_star1">Low priority</field>
110+ <field name="legend_star2">Normal priority</field>
111+ <field name="legend_star3">High priority</field>
112+ <field name="legend_star4">Highest priority</field>
113 </record>
114 <record model="crm.case.stage" id="stage_lead7">
115 <field name="name">Lost</field>
116@@ -59,6 +80,10 @@
117 <field name="on_change">1</field>
118 <field name="sequence">80</field>
119 <field name="type">opportunity</field>
120+ <field name="legend_star1">Low priority</field>
121+ <field name="legend_star2">Normal priority</field>
122+ <field name="legend_star3">High priority</field>
123+ <field name="legend_star4">Highest priority</field>
124 </record>
125
126 <record model="crm.case.section" id="sales_team.section_sales_department">
127
128=== modified file 'crm/crm_lead_view.xml'
129--- crm/crm_lead_view.xml 2014-05-12 11:41:49 +0000
130+++ crm/crm_lead_view.xml 2014-05-20 11:07:39 +0000
131@@ -259,7 +259,7 @@
132 <field name="model">crm.lead</field>
133 <field name="arch" type="xml">
134 <kanban default_group_by="stage_id">
135- <field name="stage_id"/>
136+ <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/>
137 <field name="color"/>
138 <field name="priority"/>
139 <field name="planned_revenue" sum="Expected Revenues"/>
140@@ -288,7 +288,7 @@
141 <b><field name="name"/></b>
142 <t t-if="record.planned_revenue.raw_value">
143 - <b><t t-esc="record.planned_revenue.value"/>
144- <field name="company_currency"/></b>
145+ <field name="company_currency_symbol"/></b>
146 </t>
147 </div>
148 <div>
149
150=== modified file 'crm/crm_view.xml'
151--- crm/crm_view.xml 2013-12-10 09:33:07 +0000
152+++ crm/crm_view.xml 2014-05-20 11:07:39 +0000
153@@ -107,6 +107,30 @@
154 </group>
155
156 </group>
157+ <div attrs="{'invisible':[('type','=', 'lead')]}">
158+ <separator string="Legend"/>
159+ <p>The legend will appear as tooltip of each column of the opportunities pipe.</p>
160+ <group col="3">
161+ <span width="72" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7</span>
162+ <field name="legend_star1" nolabel="1"/>
163+ <div></div>
164+ </group>
165+ <group col="3">
166+ <span width="72" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">77</span>
167+ <field name="legend_star2" nolabel="1"/>
168+ <div></div>
169+ </group>
170+ <group col="3">
171+ <span width="72" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">777</span>
172+ <field name="legend_star3" nolabel="1"/>
173+ <div></div>
174+ </group>
175+ <group col="3">
176+ <span width="72" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7777</span>
177+ <field name="legend_star4" nolabel="1"/>
178+ <div></div>
179+ </group>
180+ </div>
181 <separator string="Requirements"/>
182 <field name="requirements" nolabel="1"/>
183 <field name="section_ids" invisible="1"/>
184
185=== modified file 'hr_recruitment/hr_recruitment.py'
186--- hr_recruitment/hr_recruitment.py 2014-05-08 12:35:29 +0000
187+++ hr_recruitment/hr_recruitment.py 2014-05-20 11:07:39 +0000
188@@ -45,6 +45,27 @@
189 _name = "hr.recruitment.stage"
190 _description = "Stage of Recruitment"
191 _order = 'sequence'
192+
193+ def _get_tooltips(self, cr, uid, ids, field, args, context=None):
194+ res = {}
195+ for rec in self.read(cr, uid, ids, ['legend_star1','legend_star2','legend_star3','legend_star4','requirements'], context=context):
196+ value = ""
197+ img = "<img src='/web/static/src/img/icons/star-on.png'/>"
198+ if rec['legend_star1']:
199+ value += img +' '+ rec['legend_star1'] + "<br/>"
200+ if rec['legend_star2']:
201+ value += img + img +' '+ rec['legend_star2'] + "<br/>"
202+ if rec['legend_star3']:
203+ value += img + img + img +' '+ rec['legend_star3'] + "<br/>"
204+ if rec['legend_star4']:
205+ value += img + img + img + img +' '+ rec['legend_star4'] + "<br/>"
206+ if rec['requirements']:
207+ value += rec['requirements']
208+ tooltip = {'tooltip': value}
209+ tooltip.update(rec)
210+ res[rec['id']] = tooltip
211+ return res
212+
213 _columns = {
214 'name': fields.char('Name', size=64, required=True, translate=True),
215 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of stages."),
216@@ -54,6 +75,11 @@
217 'fold': fields.boolean('Folded in Kanban View',
218 help='This stage is folded in the kanban view when'
219 'there are no records in that stage to display.'),
220+ 'kanban_column_tooltip': fields.function(_get_tooltips, string='Tooltips', type="char", help="This tooltips will display on kanban stage header" ),
221+ 'legend_star1':fields.char('Legend Star', help='This tooltip will appear on kanban view column header.'),
222+ 'legend_star2':fields.char('Legend Star2', help='This tooltip will appear on kanban view column header.'),
223+ 'legend_star3':fields.char('Legend Star3', help='This tooltip will appear on kanban view column header.'),
224+ 'legend_star4':fields.char('Legend Star4', help='This tooltip will appear on kanban view column header.'),
225 }
226 _defaults = {
227 'sequence': 1,
228
229=== modified file 'hr_recruitment/hr_recruitment_data.xml'
230--- hr_recruitment/hr_recruitment_data.xml 2014-02-12 09:56:06 +0000
231+++ hr_recruitment/hr_recruitment_data.xml 2014-05-20 11:07:39 +0000
232@@ -92,30 +92,54 @@
233 <record model="hr.recruitment.stage" id="stage_job1">
234 <field name="name">Initial Qualification</field>
235 <field name="sequence">1</field>
236+ <field name="legend_star1">Average</field>
237+ <field name="legend_star2">Correspond to the job requirements</field>
238+ <field name="legend_star3">Nice to have skills</field>
239+ <field name="legend_star4">Excellent</field>
240 </record>
241 <record model="hr.recruitment.stage" id="stage_job2">
242 <field name="name">First Interview</field>
243 <field name="template_id" ref="applicant_interest"/>
244 <field name="sequence">2</field>
245+ <field name="legend_star1">Average</field>
246+ <field name="legend_star2">Good</field>
247+ <field name="legend_star3">Very Good</field>
248+ <field name="legend_star4">Excellent</field>
249 </record>
250 <record model="hr.recruitment.stage" id="stage_job3">
251 <field name="name">Second Interview</field>
252 <field name="sequence">3</field>
253+ <field name="legend_star1">Average</field>
254+ <field name="legend_star2">Good at required skills</field>
255+ <field name="legend_star3">Expert in required skills</field>
256+ <field name="legend_star4">Excellent in all the skills</field>
257 </record>
258 <record model="hr.recruitment.stage" id="stage_job4">
259 <field name="name">Contract Proposed</field>
260 <field name="sequence">4</field>
261+ <field name="legend_star1">Average</field>
262+ <field name="legend_star2">Good</field>
263+ <field name="legend_star3">Very Good</field>
264+ <field name="legend_star4">Excellent</field>
265 </record>
266 <record model="hr.recruitment.stage" id="stage_job5">
267 <field name="name">Contract Signed</field>
268 <field name="sequence">5</field>
269 <field name="fold" eval="True"/>
270+ <field name="legend_star1">Average</field>
271+ <field name="legend_star2">Good</field>
272+ <field name="legend_star3">Very Good</field>
273+ <field name="legend_star4">Excellent</field>
274 </record>
275 <record model="hr.recruitment.stage" id="stage_job6">
276 <field name="name">Refused</field>
277 <field name="sequence">6</field>
278 <field name="template_id" ref="applicant_refuse"/>
279 <field name="fold" eval="True"/>
280+ <field name="legend_star1">Average</field>
281+ <field name="legend_star2">Good</field>
282+ <field name="legend_star3">Very Good</field>
283+ <field name="legend_star4">Excellent</field>
284 </record>
285
286 <record id="mail_alias_jobs" model="mail.alias">
287
288=== modified file 'hr_recruitment/hr_recruitment_view.xml'
289--- hr_recruitment/hr_recruitment_view.xml 2014-05-08 15:25:36 +0000
290+++ hr_recruitment/hr_recruitment_view.xml 2014-05-20 11:07:39 +0000
291@@ -246,7 +246,7 @@
292 <field name="model">hr.applicant</field>
293 <field name="arch" type="xml">
294 <kanban default_group_by="stage_id">
295- <field name="stage_id"/>
296+ <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/>
297 <field name="color"/>
298 <field name="priority"/>
299 <field name="survey"/>
300@@ -542,6 +542,28 @@
301 <field name="template_id" domain= "[('model_id.model', '=', 'hr.applicant')]"/>
302 </group>
303 </group>
304+ <separator string="Legend"/>
305+ <p>The legend will appear as tooltip of each column of the opportunities pipe.</p>
306+ <group col="3">
307+ <span width="72" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7</span>
308+ <field name="legend_star1" nolabel="1"/>
309+ <div></div>
310+ </group>
311+ <group col="3">
312+ <span width="72" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">77</span>
313+ <field name="legend_star2" nolabel="1"/>
314+ <div></div>
315+ </group>
316+ <group col="3">
317+ <span width="72" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">777</span>
318+ <field name="legend_star3" nolabel="1"/>
319+ <div></div>
320+ </group>
321+ <group col="3">
322+ <span width="72" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7777</span>
323+ <field name="legend_star4" nolabel="1"/>
324+ <div></div>
325+ </group>
326 <separator string="Requirements"/>
327 <field name="requirements"/>
328 </sheet>
329
330=== modified file 'project/project.py'
331--- project/project.py 2014-05-13 11:18:37 +0000
332+++ project/project.py 2014-05-20 11:07:39 +0000
333@@ -34,6 +34,29 @@
334 _name = 'project.task.type'
335 _description = 'Task Stage'
336 _order = 'sequence'
337+
338+ def _get_tooltips(self, cr, uid, ids, field, args, context=None):
339+ res = {}
340+ for rec in self.read(cr, uid, ids, ['legend_blocked', 'legend_done', 'legend_star1','legend_star2','description'],context=context):
341+ value = ""
342+ star = "<img src='/web/static/src/img/icons/star-on.png'/>"
343+ if rec['legend_blocked']:
344+ img = "<img src='/web/static/src/img/icons/gtk-no.png'/>"
345+ value += img +' '+ rec['legend_blocked'] + "<br/>"
346+ if rec['legend_done']:
347+ img = "<img src='/web/static/src/img/icons/gtk-yes.png'/> "
348+ value += img +' '+ rec['legend_done'] + "<br/>"
349+ if rec['legend_star1']:
350+ value += star +' '+ rec['legend_star1'] + "<br/>"
351+ if rec['legend_star2']:
352+ value += star + star +' '+ rec['legend_star2'] + "<br/>"
353+ if rec['description']:
354+ value += rec['description']
355+ tooltip = {'tooltip': value}
356+ tooltip.update(rec)
357+ res[rec['id']] = tooltip
358+ return res
359+
360 _columns = {
361 'name': fields.char('Stage Name', required=True, size=64, translate=True),
362 'description': fields.text('Description'),
363@@ -44,6 +67,11 @@
364 'fold': fields.boolean('Folded in Kanban View',
365 help='This stage is folded in the kanban view when'
366 'there are no records in that stage to display.'),
367+ 'kanban_column_tooltip': fields.function(_get_tooltips, string='Tooltips', type="char", help="This tooltips will display on kanban stage header"),
368+ 'legend_blocked': fields.char('Legend Red', help='This tooltip will appear on kanban view column header.'),
369+ 'legend_done':fields.char('Legend Green', help='This tooltip will appear on kanban view column header.'),
370+ 'legend_star1':fields.char('Legend Star', help='This tooltip will appear on kanban view column header.'),
371+ 'legend_star2':fields.char('Legend Star2', help='This tooltip will appear on kanban view column header.'),
372 }
373
374 def _get_default_project_ids(self, cr, uid, ctx={}):
375@@ -54,6 +82,7 @@
376
377 _defaults = {
378 'sequence': 1,
379+ 'case_default': True,
380 'project_ids': _get_default_project_ids,
381 }
382 _order = 'sequence'
383@@ -543,10 +572,10 @@
384 # if alias_model has been changed, update alias_model_id accordingly
385 if vals.get('alias_model'):
386 model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', vals.get('alias_model', 'project.task'))])
387- vals.update(alias_model_id=model_ids[0])
388+ if model_ids and len(model_ids):
389+ vals.update(alias_model_id=model_ids[0])
390 return super(project, self).write(cr, uid, ids, vals, context=context)
391
392-
393 class task(osv.osv):
394 _name = "project.task"
395 _description = "Task"
396@@ -1174,6 +1203,11 @@
397 _columns = {
398 'use_tasks': fields.boolean('Tasks',help="If checked, this contract will be available in the project menu and you will be able to manage tasks or track issues"),
399 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'),
400+ 'task_label': fields.char('Use Task as', size=128, help="Gives label to tasks on project's kanaban view.", required=True),
401+ }
402+
403+ _defaults = {
404+ 'task_label': 'Tasks'
405 }
406
407 def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None):
408
409=== modified file 'project/project_data.xml'
410--- project/project_data.xml 2014-05-08 15:25:36 +0000
411+++ project/project_data.xml 2014-05-20 11:07:39 +0000
412@@ -31,32 +31,56 @@
413 <field name="sequence">1</field>
414 <field name="name">Analysis</field>
415 <field name="case_default" eval="True"/>
416+ <field name="legend_blocked">There is a problem in analysis.</field>
417+ <field name="legend_done">Ready for the next stage.</field>
418+ <field name="legend_star1">High priority for the analysis.</field>
419+ <field name="legend_star2">Highest priority for the analysis.</field>
420 </record>
421 <record id="project_tt_specification" model="project.task.type">
422 <field name="sequence">10</field>
423 <field name="name">Specification</field>
424 <field name="case_default" eval="True"/>
425+ <field name="legend_blocked">Need more info about customer’s needs.</field>
426+ <field name="legend_done">Ready for the next stage.</field>
427+ <field name="legend_star1">High priority for the specification.</field>
428+ <field name="legend_star2">Highest priority for the specification.</field>
429 </record>
430 <record id="project_tt_design" model="project.task.type">
431 <field name="sequence">11</field>
432 <field name="name">Design</field>
433 <field name="case_default" eval="True"/>
434+ <field name="legend_blocked">Design is not valid.</field>
435+ <field name="legend_done">Ready for the next stage.</field>
436+ <field name="legend_star1">High priority for the design.</field>
437+ <field name="legend_star2">Highest priority for the design.</field>
438 </record>
439 <record id="project_tt_development" model="project.task.type">
440 <field name="sequence">12</field>
441 <field name="name">Development</field>
442 <field name="case_default" eval="True"/>
443+ <field name="legend_blocked">Need help from the specification team.</field>
444+ <field name="legend_done">Ready for the next stage.</field>
445+ <field name="legend_star1">High priority for the development.</field>
446+ <field name="legend_star2">Highest priority for the development.</field>
447 </record>
448 <record id="project_tt_testing" model="project.task.type">
449 <field name="sequence">13</field>
450 <field name="name">Testing</field>
451 <field name="case_default" eval="True"/>
452+ <field name="legend_blocked">Test is failed.</field>
453+ <field name="legend_done">Test result is achieved.</field>
454+ <field name="legend_star1">High priority for the testing.</field>
455+ <field name="legend_star2">Highest priority for the testing.</field>
456 </record>
457 <record id="project_tt_merge" model="project.task.type">
458 <field name="sequence">14</field>
459 <field name="name">Merge</field>
460 <field name="case_default" eval="False"/>
461 <field name="fold" eval="True"/>
462+ <field name="legend_blocked">Conflict in any file.</field>
463+ <field name="legend_done">Ready for the next stage.</field>
464+ <field name="legend_star1">High priority for the merging.</field>
465+ <field name="legend_star2">Highest priority for the merging.</field>
466 </record>
467 <record id="project_tt_deployment" model="project.task.type">
468 <field name="sequence">20</field>
469@@ -69,6 +93,9 @@
470 <field name="name">Cancelled</field>
471 <field name="case_default" eval="True"/>
472 <field name="fold" eval="True"/>
473+ <field name="legend_done">Ready to reopen.</field>
474+ <field name="legend_star1">High priority for the reopen.</field>
475+ <field name="legend_star2">Highest priority for the reopen.</field>
476 </record>
477 </data>
478
479
480=== modified file 'project/project_demo.xml'
481--- project/project_demo.xml 2014-01-08 10:40:29 +0000
482+++ project/project_demo.xml 2014-05-20 11:07:39 +0000
483@@ -67,6 +67,7 @@
484 <field name="alias_model">project.task</field>
485 <field name="privacy_visibility">employees</field>
486 <field name="members" eval="[(4, ref('base.user_root')), (4, ref('base.user_demo'))]"/>
487+ <field name="task_label">Trainings</field>
488 </record>
489
490 <record id="project_project_3" model="project.project">
491@@ -82,6 +83,7 @@
492 <field name="alias_model">project.task</field>
493 <field name="privacy_visibility">employees</field>
494 <field name="members" eval="[(4, ref('base.user_root')), (4,ref('base.user_demo'))]"/>
495+ <field name="task_label">Designs</field>
496 </record>
497
498 <record id="project_project_4" model="project.project">
499@@ -98,6 +100,7 @@
500 <field name="members" eval="[(6, 0, [
501 ref('base.user_root'),
502 ref('base.user_demo')])]"/>
503+ <field name="task_label">Databases</field>
504 </record>
505
506 <record id="project_project_5" model="project.project">
507
508=== modified file 'project/project_view.xml'
509--- project/project_view.xml 2014-05-08 15:34:32 +0000
510+++ project/project_view.xml 2014-05-20 11:07:39 +0000
511@@ -87,15 +87,15 @@
512 <h1>
513 <field name="name" string="Project Name"/>
514 </h1>
515- <div name="options_active">
516- <field name="use_tasks" class="oe_inline"/>
517- <label for="use_tasks"/>
518+ <div name="options_active" class="oe_inline oe_left">
519+ <field name="use_tasks" class="oe_from_boolean_align"/>
520+ <label for="task_label" class="oe_edit_only"/>
521+ <b><field name="task_label" class="oe_inline"/></b>
522 </div>
523 </div>
524 <div class="oe_right oe_button_box" name="buttons" groups="base.group_user">
525- <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_tasks','=', 0)]}"
526- name="%(act_project_project_2_project_task_all)d" icon="fa-tasks">
527- <field string="Tasks" name="task_count" widget="statinfo"/>
528+ <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_tasks','=', 0)]}" name="%(act_project_project_2_project_task_all)d" icon="fa-tasks">
529+ <field name="task_count" widget="statinfo" options="{'label_field':'task_label'}"/>
530 </button>
531 <button class="oe_inline oe_stat_button" name="attachment_tree_view" type="object" icon="fa-files-o">
532 <field string="Documents" name="doc_count" widget="statinfo"/>
533@@ -170,7 +170,13 @@
534 </group>
535 </page>
536 <page string="Project Stages" attrs="{'invisible': [('use_tasks', '=', False)]}" name="project_stages">
537- <field name="type_ids"/>
538+ <field name="type_ids">
539+ <tree>
540+ <field name="sequence" widget="handle"/>
541+ <field name="name"/>
542+ <field name="kanban_column_tooltip" widget="tooltiphtml"/>
543+ </tree>
544+ </field>
545 </page>
546 </notebook>
547 </sheet>
548@@ -264,9 +270,9 @@
549 <span class="oe_e oe_e_alias">%%</span><small><field name="alias_id"/></small>
550 </div>
551 <div class="oe_kanban_project_list">
552- <a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px">
553- <t t-raw="record.task_ids.raw_value.length"/> Tasks
554- </a>
555+ <a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px">
556+ <span><field name="task_count"/> <field name="task_label"/></span>
557+ </a>
558 </div>
559 <div class="oe_kanban_project_list">
560 <a t-if="record.doc_count.raw_value" name="attachment_tree_view" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a>
561@@ -476,7 +482,7 @@
562 <kanban default_group_by="stage_id" >
563 <field name="color"/>
564 <field name="priority"/>
565- <field name="stage_id"/>
566+ <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/>
567 <field name="user_id"/>
568 <field name="user_email"/>
569 <field name="description"/>
570@@ -605,8 +611,11 @@
571 <field eval="18" name="priority"/>
572 <field name="arch" type="xml">
573 <xpath expr='//div[@name="project"]' position='inside'>
574- <field name="use_tasks"/>
575- <label for="use_tasks"/>
576+ <div name="options_active" class="oe_inline oe_left">
577+ <field name="use_tasks" class="oe_from_boolean_align"/>
578+ <label for="task_label" class="oe_edit_only"/>
579+ <b><field name="task_label" class="oe_inline"/></b>
580+ </div>
581 </xpath>
582 </field>
583 </record>
584@@ -691,6 +700,29 @@
585 <field name="fold"/>
586 </group>
587 </group>
588+ <separator string="Legends"/>
589+ <p>The legend will appear as tooltip of each column of the tasks/issues pipe.</p>
590+ <group col="3">
591+ <span width="35" class='oe_kanban_status oe_kanban_status_red' title="This tooltip will appear on kanban view column header."/>
592+ <field name="legend_blocked" nolabel="1"/>
593+ <div></div>
594+ </group>
595+ <group col="3">
596+ <span width="35" class='oe_kanban_status oe_kanban_status_green' title="This tooltip will appear on kanban view column header."/>
597+ <field name="legend_done" nolabel="1"/>
598+ <div></div>
599+ </group>
600+ <group col="3">
601+ <span width="35" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7</span>
602+ <field name="legend_star1" nolabel="1"/>
603+ <div></div>
604+ </group>
605+ <group col="3">
606+ <span width="35" class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">77</span>
607+ <field name="legend_star2" nolabel="1"/>
608+ <div></div>
609+ </group>
610+ <separator string="Description"/>
611 <field name="description" placeholder="Add a description..."/>
612 </form>
613 </field>
614@@ -729,7 +761,7 @@
615
616 <menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1" groups="base.group_no_one"/>
617
618- <menuitem action="open_task_type_form" name="Task Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/>
619+ <menuitem action="open_task_type_form" name="Project Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/>
620 <menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_project_management" sequence="1"/>
621
622
623
624=== modified file 'project/static/src/js/project.js'
625--- project/static/src/js/project.js 2014-04-17 09:05:15 +0000
626+++ project/static/src/js/project.js 2014-05-20 11:07:39 +0000
627@@ -42,4 +42,14 @@
628 }
629 },
630 });
631+
632+ openerp.web.list.TooltipHtml = openerp.web.list.Column.extend({
633+ format: function (row_data, options) {
634+ if (row_data.kanban_column_tooltip !== undefined){
635+ return row_data.kanban_column_tooltip.value.tooltip
636+ }
637+ }
638+ });
639+
640+ openerp.web.list.columns.add('field.tooltiphtml', 'openerp.web.list.TooltipHtml');
641 };
642
643=== modified file 'project_issue/project_issue.py'
644--- project_issue/project_issue.py 2014-05-08 15:25:36 +0000
645+++ project_issue/project_issue.py 2014-05-20 11:07:39 +0000
646@@ -494,13 +494,17 @@
647 (_check_escalation, 'Error! You cannot assign escalation to the same project!', ['project_escalation_id'])
648 ]
649
650-
651 class account_analytic_account(osv.Model):
652 _inherit = 'account.analytic.account'
653 _description = 'Analytic Account'
654
655 _columns = {
656 'use_issues': fields.boolean('Issues', help="Check this field if this project manages issues"),
657+ 'issue_label': fields.char('Use Issues as', size=128, help="Gives label to issues on project's kanaban view.", required=True),
658+ }
659+
660+ _defaults = {
661+ 'issue_label': 'Issues',
662 }
663
664 def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None):
665
666=== modified file 'project_issue/project_issue_demo.xml'
667--- project_issue/project_issue_demo.xml 2014-05-12 08:37:47 +0000
668+++ project_issue/project_issue_demo.xml 2014-05-20 11:07:39 +0000
669@@ -6,12 +6,15 @@
670 <field name="use_issues" eval="True"/>
671 </record>
672 <record id="project.project_project_2" model="project.project">
673+ <field name="issue_label">Bugs</field>
674 <field name="use_issues" eval="True"/>
675 </record>
676 <record id="project.project_project_3" model="project.project">
677+ <field name="issue_label">Feedbacks</field>
678 <field name="use_issues" eval="True"/>
679 </record>
680 <record id="project.project_project_4" model="project.project">
681+ <field name="issue_label">Bugs</field>
682 <field name="use_issues" eval="True"/>
683 </record>
684 <record id="project.project_project_5" model="project.project">
685
686=== modified file 'project_issue/project_issue_view.xml'
687--- project_issue/project_issue_view.xml 2014-05-08 15:34:32 +0000
688+++ project_issue/project_issue_view.xml 2014-05-20 11:07:39 +0000
689@@ -185,7 +185,7 @@
690 <field name="model">project.issue</field>
691 <field name="arch" type="xml">
692 <kanban default_group_by="stage_id">
693- <field name="stage_id"/>
694+ <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/>
695 <field name="color"/>
696 <field name="priority"/>
697 <field name="user_email"/>
698@@ -281,14 +281,15 @@
699 <field name="inherit_id" ref="project.edit_project"/>
700 <field name="arch" type="xml">
701 <xpath expr='//div[@name="options_active"]' position='inside'>
702- <field name="use_issues" class="oe_inline"
703- on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/>
704- <label for="use_issues"/>
705+ <div>
706+ <field name="use_issues" class="oe_inline" on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/>
707+ <label for="issue_label" class="oe_edit_only"/>
708+ <b><field name="issue_label" class="oe_inline"/></b>
709+ </div>
710 </xpath>
711 <xpath expr='//div[@name="buttons"]' position='inside'>
712- <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"
713- name="%(act_project_project_2_project_issue_all)d" icon="fa-bug">
714- <field string="Issues" name="issue_count" widget="statinfo"/>
715+ <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_issues','=', 0)]}" name="%(act_project_project_2_project_issue_all)d" icon="fa-bug">
716+ <field name="issue_count" widget="statinfo" options="{'label_field':'issue_label'}"/>
717 </button>
718 </xpath>
719 <xpath expr='//page[@name="project_stages"]' position="attributes">
720@@ -300,6 +301,9 @@
721 <field name="sequence" position="before">
722 <field name="project_escalation_id"/>
723 </field>
724+ <xpath expr='//page[@name="project_stages"]' position="attributes">
725+ <attribute name="attrs">{'invisible': [('use_issues', '=', False), ('use_tasks', '=', False)]}</attribute>
726+ </xpath>
727 </field>
728 </record>
729
730@@ -314,10 +318,8 @@
731 </field>
732 <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
733 <a t-if="record.use_issues.raw_value" style="margin-right: 10px"
734- name="%(act_project_project_2_project_issue_all)d" type="action">
735- <t t-raw="record.issue_ids.raw_value.length"/>
736- <span t-if="record.issue_ids.raw_value.length == 1">Issue</span>
737- <span t-if="record.issue_ids.raw_value.length > 1">Issues</span>
738+ name="%(act_project_project_2_project_issue_all)d" type="action">
739+ <span><field name="issue_count"/> <field name="issue_label"/></span>
740 </a>
741 </xpath>
742 </field>
743@@ -330,8 +332,11 @@
744 <field eval="18" name="priority"/>
745 <field name="arch" type="xml">
746 <xpath expr='//div[@name="project"]' position='inside'>
747- <field name="use_issues"/>
748- <label for="use_issues"/>
749+ <div class="oe_left">
750+ <field name="use_issues" class="oe_from_boolean_align"/>
751+ <label for="issue_label" class="oe_edit_only"/>
752+ <b><field name="issue_label" class="oe_inline"/></b>
753+ </div>
754 </xpath>
755 </field>
756 </record>
757
758=== modified file 'project_timesheet/project_timesheet_view.xml'
759--- project_timesheet/project_timesheet_view.xml 2014-04-15 12:57:15 +0000
760+++ project_timesheet/project_timesheet_view.xml 2014-05-20 11:07:39 +0000
761@@ -25,7 +25,7 @@
762 <field name="model">project.project</field>
763 <field name="inherit_id" ref="project.edit_project"/>
764 <field name="arch" type="xml">
765- <xpath expr='//div[@name="options_active"]' position='inside'>
766+ <xpath expr='//div[@name="options_active"]' position='before'>
767 <field name="use_timesheets" class="oe_inline"/>
768 <label for="use_timesheets"/>
769 </xpath>

Subscribers

People subscribed via source and target branches

to all changes: