Merge lp:~openerp-dev/openobject-addons/trunk-customize_kanban-pan into lp:openobject-addons
- trunk-customize_kanban-pan
- Merge into trunk
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-customize_kanban-pan |
Merge into: | lp:openobject-addons |
Diff against target: |
623 lines (+245/-28) 16 files modified
crm/crm_lead_data.xml (+18/-0) crm/crm_view.xml (+7/-3) crm/static/src/js/crm_case_section.js (+23/-2) hr_recruitment/__openerp__.py (+1/-0) hr_recruitment/hr_recruitment_data.xml (+20/-0) hr_recruitment/hr_recruitment_view.xml (+6/-2) hr_recruitment/static/src/js/hr_recruitment.js (+26/-0) project/project.py (+5/-3) project/project_data.xml (+19/-0) project/project_view.xml (+21/-8) project/static/src/css/project.css (+3/-0) project/static/src/js/project.js (+57/-1) project_issue/__openerp__.py (+1/-0) project_issue/project_issue.py (+7/-1) project_issue/project_issue_view.xml (+13/-8) project_issue/static/src/js/project_issue.js (+18/-0) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-customize_kanban-pan |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+164843@code.launchpad.net |
This proposal supersedes a proposal from 2013-03-20.
Commit message
Description of the change
Hello,
Improved the description/
1) Here if user enters like below and save:
[green] = ready for next stage
[red] = Blocked
[Star] [Star] [Star] = High priority
then:-> in the read_only page view the value inside the square bracket '[]' should appear accordingly.
if [green] then green's image , if [red] then red's image and if [star] then star's image.
2) Made The Legend tool tip of the column in kanban. So that no need to go form_view of the stage to see the
description or the requirements.the tool tip available on hover on the title of kanban column.
3) Added help string below description field so that user can understand that how to enter the legends value.
4) Added records in to the data file for the preconfigured legends.
5) Added the 'legends' widget in requirement/
And also added js files in crm and hr_applicant for that.
6) Make visible legends in the list view of the stage for more user help.
Improved project kanbanview and form view
1) [] Use tasks -> if true the "as: [ Tasks ]" appears. the user can rename Issues into whatever he wants
[] Use issues-> if true the "as: [ Issues ]" appears. the user can rename Issues into whatever he wants
2) rename the tab Task Stages into "Stages"
3) If the user select use Issues, the tab "Stages" must appear
Pad Link: http://
Kindly Review the code.
Thanks,
PAN
- 8668. By RGA(OpenERP)
-
Merge with trunk
- 8669. By RGA(OpenERP)
-
[IMP] Add legend in kanban view of crm
- 8670. By RGA(OpenERP)
-
[IMP] project: improve usability/help
- 8671. By RGA(OpenERP)
-
[IMP] hr_recruitment: improve usability/help
- 8672. By RGA(OpenERP)
-
[IMP] CRM: improve usability/help
- 8673. By RGA(OpenERP)
-
[FIX] alignment problem
- 8674. By RGA(OpenERP)
-
Merge with trunk
- 8675. By RGA(OpenERP)
-
Merge with trunk
- 8676. By RGA(OpenERP)
-
[IMP] tips for project and issue checkbox
- 8677. By RGA(OpenERP)
-
[IMP] Contract: diplay rename project & issue
- 8678. By RGA(OpenERP)
-
improve legend help
- 8679. By RGA(OpenERP)
-
[FIX] alingment problem when we want to use field value as lable
- 8680. By RGA(OpenERP)
-
Merge with trunk
- 8681. By RGA(OpenERP)
-
Merge with trunk
- 8682. By RGA(OpenERP)
-
Merge with trunk
- 8683. By RGA(OpenERP)
-
[FIX] kanban record should be re-render with legend widget
- 8684. By RGA(OpenERP)
-
[IMP] usability: legend help
- 8685. By RGA(OpenERP)
-
[IMP] add option to dipslay only perticular state msg in tooltip
- 8686. By RGA(OpenERP)
-
Merge with trunk
- 8687. By RGA(OpenERP)
-
[IMP] tooltips
- 8688. By RGA(OpenERP)
-
Improve/currect the tooltips
- 8689. By RGA(OpenERP)
-
[FIX] alignment problem of field due to invisible field in group
Unmerged revisions
- 8689. By RGA(OpenERP)
-
[FIX] alignment problem of field due to invisible field in group
- 8688. By RGA(OpenERP)
-
Improve/currect the tooltips
- 8687. By RGA(OpenERP)
-
[IMP] tooltips
- 8686. By RGA(OpenERP)
-
Merge with trunk
- 8685. By RGA(OpenERP)
-
[IMP] add option to dipslay only perticular state msg in tooltip
- 8684. By RGA(OpenERP)
-
[IMP] usability: legend help
- 8683. By RGA(OpenERP)
-
[FIX] kanban record should be re-render with legend widget
- 8682. By RGA(OpenERP)
-
Merge with trunk
- 8681. By RGA(OpenERP)
-
Merge with trunk
- 8680. By RGA(OpenERP)
-
Merge with trunk
Preview Diff
1 | === modified file 'crm/crm_lead_data.xml' |
2 | --- crm/crm_lead_data.xml 2013-06-20 15:21:47 +0000 |
3 | +++ crm/crm_lead_data.xml 2013-06-28 10:23:29 +0000 |
4 | @@ -10,6 +10,7 @@ |
5 | <field eval="0" name="probability"/> |
6 | <field eval="10" name="sequence"/> |
7 | <field name="type">both</field> |
8 | + <field name="requirements">[star] = High Priority</field> |
9 | </record> |
10 | <record model="crm.case.stage" id="stage_lead2"> |
11 | <field name="name">Opportunity</field> |
12 | @@ -27,6 +28,7 @@ |
13 | <field eval="0" name="probability"/> |
14 | <field eval="30" name="sequence"/> |
15 | <field name="type">lead</field> |
16 | + <field name="requirements">[star] = High Priority</field> |
17 | </record> |
18 | <record model="crm.case.stage" id="stage_lead3"> |
19 | <field name="name">Qualification</field> |
20 | @@ -35,6 +37,7 @@ |
21 | <field eval="20" name="probability"/> |
22 | <field eval="100" name="sequence"/> |
23 | <field name="type">opportunity</field> |
24 | + <field name="requirements">[star] = High Priority</field> |
25 | </record> |
26 | <record model="crm.case.stage" id="stage_lead4"> |
27 | <field name="name">Proposition</field> |
28 | @@ -43,6 +46,8 @@ |
29 | <field eval="40" name="probability"/> |
30 | <field eval="110" name="sequence"/> |
31 | <field name="type">opportunity</field> |
32 | + <field name="requirements">[star] = Potentially Won |
33 | + In this stage, contact the customer, make him a proposition and send him a quotation. If you don't get answer after 2 days, remind the customer about the proposition</field> |
34 | </record> |
35 | <record model="crm.case.stage" id="stage_lead5"> |
36 | <field name="name">Negotiation</field> |
37 | @@ -51,6 +56,7 @@ |
38 | <field eval="60" name="probability"/> |
39 | <field eval="120" name="sequence"/> |
40 | <field name="type">opportunity</field> |
41 | + <field name="requirements">[star] = High Priority</field> |
42 | </record> |
43 | <record model="crm.case.stage" id="stage_lead6"> |
44 | <field name="name">Won</field> |
45 | @@ -61,6 +67,17 @@ |
46 | <field eval="130" name="sequence"/> |
47 | <field eval="1" name="on_change"/> |
48 | <field name="type">opportunity</field> |
49 | + <field name="requirements">[star] = High Priority</field> |
50 | + </record> |
51 | + <record model="crm.case.stage" id="stage_lead7"> |
52 | + <field name="name">Dead</field> |
53 | + <field eval="1" name="case_default"/> |
54 | + <field eval="False" name="fold"/> |
55 | + <field name="state">cancel</field> |
56 | + <field eval="'0'" name="probability"/> |
57 | + <field eval="'16'" name="sequence"/> |
58 | + <field name="type">lead</field> |
59 | + <field name="requirements">[star] = High Priority</field> |
60 | </record> |
61 | <record model="crm.case.stage" id="stage_lead8"> |
62 | <field name="name">Lost</field> |
63 | @@ -71,6 +88,7 @@ |
64 | <field eval="0" name="probability"/> |
65 | <field eval="140" name="sequence"/> |
66 | <field name="type">opportunity</field> |
67 | + <field name="requirements">[star] = High Priority</field> |
68 | </record> |
69 | |
70 | <record model="crm.case.section" id="section_sales_department"> |
71 | |
72 | === modified file 'crm/crm_view.xml' |
73 | --- crm/crm_view.xml 2013-05-22 09:40:33 +0000 |
74 | +++ crm/crm_view.xml 2013-06-28 10:23:29 +0000 |
75 | @@ -82,6 +82,7 @@ |
76 | <field name="probability"/> |
77 | <field name="state"/> |
78 | <field name="type"/> |
79 | + <field name="requirements" widget="legends"/> |
80 | </tree> |
81 | </field> |
82 | </record> |
83 | @@ -101,12 +102,15 @@ |
84 | <field name="type"/> |
85 | <field name="on_change"/> |
86 | <field name="sequence"/> |
87 | + <field name="fold"/> |
88 | <field name="case_default" groups="base.group_multi_salesteams"/> |
89 | - <field name="fold"/> |
90 | </group> |
91 | - <separator string="Requirements"/> |
92 | - <field name="requirements" nolabel="1"/> |
93 | + <separator string="Legend and Requirements"/> |
94 | + <field name="requirements" widget = "legends" nolabel="1"/> |
95 | <field name="section_ids" invisible="1"/> |
96 | + <p class="oe_grey"> |
97 | + <span class="oe_form_field_legend">Guide your staff through each step of the sales process. Describe requirements and explain the meaning of the star. All comments will be displayed in a tooltip on each column of the sales process. To make <span class='oe_e star'>7</span> appear in the legend:<br/>[star] = <span class='oe_e star'>7</span>. </span> |
98 | + </p> |
99 | </form> |
100 | </field> |
101 | </record> |
102 | |
103 | === modified file 'crm/static/src/js/crm_case_section.js' |
104 | --- crm/static/src/js/crm_case_section.js 2013-05-31 15:31:00 +0000 |
105 | +++ crm/static/src/js/crm_case_section.js 2013-06-28 10:23:29 +0000 |
106 | @@ -7,8 +7,29 @@ |
107 | this._super.apply(this, arguments); |
108 | } |
109 | }, |
110 | - }); |
111 | - |
112 | + renderElement: function() { |
113 | + this._super.apply(this, arguments); |
114 | + if(this.group.description_data){ |
115 | + openerp.web.show_legend(this.$el.find('.oe_star_on, .oe_star_off'), this.group.description_data); |
116 | + } |
117 | + } |
118 | + }); |
119 | + openerp.web_kanban.KanbanGroup.include({ |
120 | + start: function() { |
121 | + this._super.apply(this, arguments); |
122 | + var self = this; |
123 | + if(self.dataset.model == "crm.lead") { |
124 | + self.description_field = 'requirements'; |
125 | + $.when(self.get_legend(self.$el.find('.oe_kanban_group_title_text'))).done(function(){ |
126 | + _.each(self.records,function(rec){ |
127 | + if(self.description_data){ |
128 | + openerp.web.show_legend(rec.$el.find('.oe_star_on, .oe_star_off'), self.description_data); |
129 | + } |
130 | + }) |
131 | + }); |
132 | + } |
133 | + } |
134 | + }); |
135 | openerp.crm.SparklineBarWidget = openerp.web_kanban.AbstractField.extend({ |
136 | className: "oe_sparkline_bar", |
137 | start: function() { |
138 | |
139 | === modified file 'hr_recruitment/__openerp__.py' |
140 | --- hr_recruitment/__openerp__.py 2013-02-18 08:53:03 +0000 |
141 | +++ hr_recruitment/__openerp__.py 2013-06-28 10:23:29 +0000 |
142 | @@ -64,6 +64,7 @@ |
143 | 'installable': True, |
144 | 'auto_install': False, |
145 | 'application': True, |
146 | + 'js': ['static/src/js/hr_recruitment.js'], |
147 | } |
148 | |
149 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
150 | |
151 | === modified file 'hr_recruitment/hr_recruitment_data.xml' |
152 | --- hr_recruitment/hr_recruitment_data.xml 2013-02-13 07:35:33 +0000 |
153 | +++ hr_recruitment/hr_recruitment_data.xml 2013-06-28 10:23:29 +0000 |
154 | @@ -55,32 +55,52 @@ |
155 | <field name="name">Initial Qualification</field> |
156 | <field name="state">draft</field> |
157 | <field name="sequence">1</field> |
158 | + <field name="requirements">[star] = Good |
159 | +[star][star] = Very Good |
160 | +[star][star][star] = Excellent</field> |
161 | </record> |
162 | <record model="hr.recruitment.stage" id="stage_job2"> |
163 | <field name="name">First Interview</field> |
164 | <field name="state">open</field> |
165 | <field name="sequence">2</field> |
166 | + <field name="requirements">[star] = Good |
167 | +[star][star] = Very Good |
168 | +[star][star][star] = Excellent</field> |
169 | </record> |
170 | <record model="hr.recruitment.stage" id="stage_job3"> |
171 | <field name="name">Second Interview</field> |
172 | <field name="state">open</field> |
173 | <field name="sequence">3</field> |
174 | + <field name="requirements">[star] = good, the cv match to the job description |
175 | +[star][star] = really good, some "nice to have" skill |
176 | +[star][star][star] = excellent, it is exactly the employee we are looking for |
177 | +The second interview must be conducted by the manager of the applied job department. Don't forget to include it in the schedule of the meeting. |
178 | + </field> |
179 | </record> |
180 | <record model="hr.recruitment.stage" id="stage_job4"> |
181 | <field name="name">Contract Proposed</field> |
182 | <field name="state">pending</field> |
183 | <field name="sequence">4</field> |
184 | + <field name="requirements">[star] = Good |
185 | +[star][star] = Very Good |
186 | +[star][star][star] = Excellent</field> |
187 | </record> |
188 | <record model="hr.recruitment.stage" id="stage_job5"> |
189 | <field name="name">Contract Signed</field> |
190 | <field name="state">done</field> |
191 | <field name="sequence">5</field> |
192 | + <field name="requirements">[star] = Good |
193 | +[star][star] = Very Good |
194 | +[star][star][star] = Excellent</field> |
195 | </record> |
196 | <record model="hr.recruitment.stage" id="stage_job6"> |
197 | <field name="name">Refused</field> |
198 | <field name="state">cancel</field> |
199 | <field name="sequence">6</field> |
200 | <field name="fold" eval="True"/> |
201 | + <field name="requirements">[star] = Good |
202 | +[star][star] = Very Good |
203 | +[star][star][star] = Excellent</field> |
204 | </record> |
205 | <record id="survey_job_0" model="survey"> |
206 | <field name="title">Job Survey</field> |
207 | |
208 | === modified file 'hr_recruitment/hr_recruitment_view.xml' |
209 | --- hr_recruitment/hr_recruitment_view.xml 2013-06-25 08:46:21 +0000 |
210 | +++ hr_recruitment/hr_recruitment_view.xml 2013-06-28 10:23:29 +0000 |
211 | @@ -343,6 +343,7 @@ |
212 | <field name="name"/> |
213 | <field name="department_id"/> |
214 | <field name="state"/> |
215 | + <field name="requirements" widget="legends"/> |
216 | </tree> |
217 | </field> |
218 | </record> |
219 | @@ -365,8 +366,11 @@ |
220 | <field name="fold"/> |
221 | </group> |
222 | </group> |
223 | - <separator string="Requirements"/> |
224 | - <field name="requirements"/> |
225 | + <separator string="Legend and Requirements"/> |
226 | + <field name="requirements" widget="legends"/> |
227 | + <p class="oe_grey"> |
228 | + <span class="oe_form_field_legend">Guide your staff through each step of the recruitment process. Describe requirements and explain the meaning of star. All comments will be displayed in a tooltip on each column of recruitment process. To make <span class='oe_e star'>7</span> appear in the legend:<br/> [star] = <span class='oe_e star'>7</span><br/>[star] [star] = <span class='oe_e star'>7</span><span class='oe_e star'>7</span><br/>[star] [star] [star] = <span class='oe_e star'>7</span><span class='oe_e star'>7</span><span class='oe_e star'>7</span></span> |
229 | + </p> |
230 | </sheet> |
231 | </form> |
232 | </field> |
233 | |
234 | === added directory 'hr_recruitment/static/src/js' |
235 | === added file 'hr_recruitment/static/src/js/hr_recruitment.js' |
236 | --- hr_recruitment/static/src/js/hr_recruitment.js 1970-01-01 00:00:00 +0000 |
237 | +++ hr_recruitment/static/src/js/hr_recruitment.js 2013-06-28 10:23:29 +0000 |
238 | @@ -0,0 +1,26 @@ |
239 | +openerp.hr_recruitment = function(openerp) { |
240 | + openerp.web_kanban.KanbanRecord.include({ |
241 | + renderElement: function() { |
242 | + this._super.apply(this, arguments); |
243 | + if(this.group.description_data){ |
244 | + openerp.web.show_legend(this.$el.find('.oe_kanban_action img'), this.group.description_data); |
245 | + } |
246 | + } |
247 | + }); |
248 | + openerp.web_kanban.KanbanGroup = openerp.web_kanban.KanbanGroup.extend({ |
249 | + start: function() { |
250 | + this._super.apply(this, arguments); |
251 | + var self = this; |
252 | + if(self.dataset.model == "hr.applicant") { |
253 | + self.description_field = 'requirements'; |
254 | + $.when(self.get_legend(self.$el.find('.oe_kanban_group_title_text'))).done(function(){ |
255 | + _.each(self.records,function(rec){ |
256 | + if(self.description_data){ |
257 | + openerp.web.show_legend(rec.$el.find('.oe_kanban_action img'), self.description_data); |
258 | + } |
259 | + }) |
260 | + }); |
261 | + } |
262 | + } |
263 | + }); |
264 | +}; |
265 | |
266 | === modified file 'project/project.py' |
267 | --- project/project.py 2013-06-27 14:46:47 +0000 |
268 | +++ project/project.py 2013-06-28 10:23:29 +0000 |
269 | @@ -593,7 +593,7 @@ |
270 | def _get_default_stage_id(self, cr, uid, context=None): |
271 | """ Gives default stage_id """ |
272 | project_id = self._get_default_project_id(cr, uid, context=context) |
273 | - return self.stage_find(cr, uid, [], project_id, [('state', '=', 'draft')], context=context) |
274 | + return self.stage_find(cr, uid, [], project_id, [], context=context) |
275 | |
276 | def _resolve_project_id_from_context(self, cr, uid, context=None): |
277 | """ Returns ID of project based on the value of 'default_project_id' |
278 | @@ -1292,8 +1292,9 @@ |
279 | _inherit = 'account.analytic.account' |
280 | _description = 'Analytic Account' |
281 | _columns = { |
282 | - '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"), |
283 | + 'use_tasks': fields.boolean('Tasks',help="Use of task is great for internal stuff"), |
284 | 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), |
285 | + 'rename_tasks': fields.char('Rename Tasks', size=32) |
286 | } |
287 | |
288 | def on_change_template(self, cr, uid, ids, template_id, context=None): |
289 | @@ -1354,7 +1355,8 @@ |
290 | class project_project(osv.osv): |
291 | _inherit = 'project.project' |
292 | _defaults = { |
293 | - 'use_tasks': True |
294 | + 'use_tasks': True, |
295 | + 'rename_tasks': 'Task' |
296 | } |
297 | |
298 | class project_task_history(osv.osv): |
299 | |
300 | === modified file 'project/project_data.xml' |
301 | --- project/project_data.xml 2013-03-21 16:29:39 +0000 |
302 | +++ project/project_data.xml 2013-06-28 10:23:29 +0000 |
303 | @@ -32,30 +32,46 @@ |
304 | <field name="name">Analysis</field> |
305 | <field name="state">draft</field> |
306 | <field name="case_default" eval="False"/> |
307 | + <field name="description">[green] = Ready for next stage |
308 | +[red] = Blocked |
309 | +[star] = Urgent</field> |
310 | </record> |
311 | <record id="project_tt_specification" model="project.task.type"> |
312 | <field name="sequence">2</field> |
313 | <field name="name">Specification</field> |
314 | <field name="state">pending</field> |
315 | <field name="case_default" eval="True"/> |
316 | + <field name="description">[green] = Ready for next stage |
317 | +[red] = Blocked |
318 | +[star] = Urgent</field> |
319 | </record> |
320 | <record id="project_tt_design" model="project.task.type"> |
321 | <field name="sequence">2</field> |
322 | <field name="name">Design</field> |
323 | <field name="state">open</field> |
324 | <field name="case_default" eval="True"/> |
325 | + <field name="description">[green] = Ready for next stage |
326 | +[red] = Blocked |
327 | +[star] = Urgent</field> |
328 | </record> |
329 | <record id="project_tt_development" model="project.task.type"> |
330 | <field name="sequence">3</field> |
331 | <field name="name">Development</field> |
332 | <field name="state">open</field> |
333 | <field name="case_default" eval="True"/> |
334 | + <field name="description">[green] = Ready for next stage |
335 | +[red] = Blocked |
336 | +[star] = Urgent</field> |
337 | </record> |
338 | <record id="project_tt_testing" model="project.task.type"> |
339 | <field name="sequence">4</field> |
340 | <field name="name">Testing</field> |
341 | <field name="state">open</field> |
342 | <field name="case_default" eval="True"/> |
343 | + <field name="description">[green] = ready to be used by the customer, the consultant can take it in the next stage to show it to the customer. |
344 | +[red] = need improvement, please take it back in previous stage. |
345 | +[star] = must be tested in priority |
346 | +John Smith and his team are responsible for this step of the project. For any query, you can refer to them.</field> |
347 | </record> |
348 | <record id="project_tt_merge" model="project.task.type"> |
349 | <field name="sequence">5</field> |
350 | @@ -63,6 +79,9 @@ |
351 | <field name="state">open</field> |
352 | <field name="case_default" eval="False"/> |
353 | <field name="fold" eval="True"/> |
354 | + <field name="description">[green] = Ready for next stage |
355 | +[red] = Blocked |
356 | +[star] = Urgent</field> |
357 | </record> |
358 | <record id="project_tt_deployment" model="project.task.type"> |
359 | <field name="sequence">100</field> |
360 | |
361 | === modified file 'project/project_view.xml' |
362 | --- project/project_view.xml 2013-06-17 09:51:41 +0000 |
363 | +++ project/project_view.xml 2013-06-28 10:23:29 +0000 |
364 | @@ -91,8 +91,13 @@ |
365 | <field name="name" string="Project Name"/> |
366 | </h1> |
367 | <div name="options_active"> |
368 | - <field name="use_tasks" class="oe_inline"/> |
369 | - <label for="use_tasks"/> |
370 | + <div name="project"> |
371 | + <field name="use_tasks" title="Use of task is great for internal stuff" class="oe_inline" style="vertical-align:bottom;"/> |
372 | + <label for="use_tasks" string="Use Task" attrs="{'invisible':[('rename_tasks','!=',False)]}"/> |
373 | + <label for="use_tasks" string="Use Task" class="oe_edit_only oe_inline" attrs="{'invisible':[('rename_tasks','==',False)]}"/> |
374 | + <label string="as:" class="oe_edit_only oe_inline"/> |
375 | + <b><field name="rename_tasks" class="oe_inline"/></b> |
376 | + </div> |
377 | </div> |
378 | </div> |
379 | <div class="oe_right oe_button_box" name="buttons" groups="base.group_user"> |
380 | @@ -262,8 +267,8 @@ |
381 | </div> |
382 | <div class="oe_kanban_project_list"> |
383 | <a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px"> |
384 | - <span t-if="record.task_count.raw_value gt 1"><field name="task_count"/> Tasks</span> |
385 | - <span t-if="record.task_count.raw_value lt 2"><field name="task_count"/> Task</span> |
386 | + <span t-if="record.task_count.raw_value gt 1"><field name="task_count"/> <field name="rename_tasks"/>s</span> |
387 | + <span t-if="record.task_count.raw_value lt 2"><field name="task_count"/> <field name="rename_tasks"/></span> |
388 | </a> |
389 | </div> |
390 | <div class="oe_kanban_project_list"> |
391 | @@ -624,8 +629,9 @@ |
392 | <field eval="18" name="priority"/> |
393 | <field name="arch" type="xml"> |
394 | <xpath expr='//div[@name="project"]' position='inside'> |
395 | - <field name="use_tasks"/> |
396 | - <label for="use_tasks"/> |
397 | + <field name="use_tasks" title="Use of task is great for internal stuff" class="oe_inline" style="vertical-align:bottom;"/> |
398 | + <label for="use_tasks" string="Task" attrs="{'invisible':[('rename_tasks','!=',False)]}"/> |
399 | + <b><field name="rename_tasks" readonly="True" class="oe_inline oe_field_as_label"/></b> |
400 | </xpath> |
401 | </field> |
402 | </record> |
403 | @@ -711,7 +717,13 @@ |
404 | <field name="fold"/> |
405 | </group> |
406 | </group> |
407 | - <field name="description" placeholder="Add a description..."/> |
408 | + <separator string="Legend and Description"/> |
409 | + <field name="description" widget='legends'/> |
410 | + <p class="oe_grey"> |
411 | + <span class="oe_form_field_legend">Guide your staff through each step of the project. Describe requirements and explain the meaning of the star and the buttons in the view. |
412 | +All comments are displayed as tooltip of each column of activities process. To make appear <span class='oe_e star'>7</span> <span class="green"/> or <span class='red'/> in the legend:<br/> |
413 | +[star] = <span class='oe_e star'>7</span> <br/>[green] = <span class="green"/> <br/> [red] = <span class='red'/></span> |
414 | + </p> |
415 | </form> |
416 | </field> |
417 | </record> |
418 | @@ -724,6 +736,7 @@ |
419 | <field name="sequence" widget="handle"/> |
420 | <field name="name"/> |
421 | <field name="state"/> |
422 | + <field name="description" widget="legends"/> |
423 | </tree> |
424 | </field> |
425 | </record> |
426 | @@ -749,7 +762,7 @@ |
427 | |
428 | <menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1" groups="base.group_no_one"/> |
429 | |
430 | - <menuitem action="open_task_type_form" name="Task Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/> |
431 | + <menuitem action="open_task_type_form" name="Project Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/> |
432 | <menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_project_management" sequence="1"/> |
433 | |
434 | |
435 | |
436 | === modified file 'project/static/src/css/project.css' |
437 | --- project/static/src/css/project.css 2013-04-05 15:19:14 +0000 |
438 | +++ project/static/src/css/project.css 2013-06-28 10:23:29 +0000 |
439 | @@ -62,4 +62,7 @@ |
440 | -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); |
441 | } |
442 | |
443 | +.oe_form_field.oe_inline.oe_field_as_label { |
444 | + padding: 0px 8px 2px 2px; |
445 | +} |
446 | |
447 | |
448 | === modified file 'project/static/src/js/project.js' |
449 | --- project/static/src/js/project.js 2012-11-29 22:26:45 +0000 |
450 | +++ project/static/src/js/project.js 2013-06-28 10:23:29 +0000 |
451 | @@ -38,7 +38,18 @@ |
452 | this._super.apply(this, arguments); |
453 | if(new_group.state.folded) |
454 | new_group.do_action_toggle_fold(); |
455 | - } |
456 | + }, |
457 | + do_search: function(domain, context, group_by) { |
458 | + var self = this; |
459 | + if(context['default_project_id']) { |
460 | + self.alive(new openerp.web.Model("project.project").get_func("read")(context['default_project_id'], ["rename_tasks","rename_issues"])).then(function(res) { |
461 | + self.dataset.model == "project.task" ? self.rename = 'rename_tasks' : self.rename = 'rename_issues' |
462 | + if(res[self.rename]) |
463 | + self.set({ 'title' : res[self.rename] }); |
464 | + }); |
465 | + } |
466 | + return this._super.apply(this, arguments); |
467 | + }, |
468 | }); |
469 | |
470 | openerp.web_kanban.KanbanRecord.include({ |
471 | @@ -49,5 +60,50 @@ |
472 | this._super.apply(this, arguments); |
473 | } |
474 | }, |
475 | + display_status: function(rec){ |
476 | + var display_only; |
477 | + display_only = ['star']; |
478 | + if(rec.record.kanban_state.raw_value == 'blocked') |
479 | + display_only.push('red'); |
480 | + if(rec.record.kanban_state.raw_value == 'done') |
481 | + display_only.push('green'); |
482 | + if(rec.record.kanban_state.raw_value == 'normal') |
483 | + display_only = [] |
484 | + return display_only |
485 | + }, |
486 | + renderElement: function() { |
487 | + this._super.apply(this, arguments); |
488 | + var self = this |
489 | + if(this.group.description_value){ |
490 | + var display_only; |
491 | + display_only = self.display_status(self) |
492 | + var record_tips = openerp.web.parselegend(this.group.description_value, display_only); |
493 | + var parse_value = openerp.web.parselegend(record_tips) |
494 | + openerp.web.show_legend(this.$el.find('.oe_kanban_status, .oe_star_on, .oe_star_off'), parse_value); |
495 | + } |
496 | + |
497 | + } |
498 | + }); |
499 | + openerp.web_kanban.KanbanGroup.include({ |
500 | + start: function() { |
501 | + this._super.apply(this, arguments); |
502 | + var self = this; |
503 | + if(self.dataset.model == "project.task") { |
504 | + self.description_field = 'description'; |
505 | + (new openerp.web.Model('project.task.type')).query([this.description_field]).filter([["id", "=", this.value]]).first().done(function(res){ |
506 | + if(res[self.description_field]){ |
507 | + self.description_value = res[self.description_field]; |
508 | + var group_tips = openerp.web.parselegend(res[self.description_field]) |
509 | + openerp.web.show_legend(self.$el.find('.oe_kanban_group_title_text'), group_tips); |
510 | + _.each(self.records,function(rec){ |
511 | + var display_only; |
512 | + display_only = rec.display_status(rec); |
513 | + var record_tips = openerp.web.parselegend(res[self.description_field], display_only); |
514 | + openerp.web.show_legend(rec.$el.find('.oe_kanban_status, .oe_star_on, .oe_star_off'), record_tips); |
515 | + }) |
516 | + } |
517 | + }) |
518 | + } |
519 | + } |
520 | }); |
521 | }; |
522 | |
523 | === modified file 'project_issue/__openerp__.py' |
524 | --- project_issue/__openerp__.py 2012-11-29 22:26:45 +0000 |
525 | +++ project_issue/__openerp__.py 2013-06-28 10:23:29 +0000 |
526 | @@ -61,6 +61,7 @@ |
527 | 'installable': True, |
528 | 'auto_install': False, |
529 | 'application': True, |
530 | + 'js': ['static/src/js/project_issue.js'], |
531 | } |
532 | |
533 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
534 | |
535 | === modified file 'project_issue/project_issue.py' |
536 | --- project_issue/project_issue.py 2013-06-27 14:46:47 +0000 |
537 | +++ project_issue/project_issue.py 2013-06-28 10:23:29 +0000 |
538 | @@ -621,7 +621,13 @@ |
539 | _description = 'Analytic Account' |
540 | |
541 | _columns = { |
542 | - 'use_issues': fields.boolean('Issues', help="Check this field if this project manages issues"), |
543 | + 'use_issues' : fields.boolean('Issues', help="Use of issue is great to communicate with your customer"), |
544 | + 'rename_issues': fields.char('Rename Issues', size=32) |
545 | + } |
546 | + |
547 | + _defaults = { |
548 | + 'use_issues': True, |
549 | + 'rename_issues': 'Issue' |
550 | } |
551 | |
552 | def on_change_template(self, cr, uid, ids, template_id, context=None): |
553 | |
554 | === modified file 'project_issue/project_issue_view.xml' |
555 | --- project_issue/project_issue_view.xml 2013-06-17 09:51:41 +0000 |
556 | +++ project_issue/project_issue_view.xml 2013-06-28 10:23:29 +0000 |
557 | @@ -308,10 +308,14 @@ |
558 | <field name="model">project.project</field> |
559 | <field name="inherit_id" ref="project.edit_project"/> |
560 | <field name="arch" type="xml"> |
561 | - <xpath expr='//div[@name="options_active"]' position='inside'> |
562 | - <field name="use_issues" class="oe_inline" |
563 | - on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/> |
564 | - <label for="use_issues"/> |
565 | + <xpath expr='//div[@name="project"]' position='after'> |
566 | + <div> |
567 | + <field name="use_issues" title="Use of issue is great to communicate with your customer" class="oe_inline"/> |
568 | + <label for="use_issues" string="Use Issue" attrs="{'invisible':[('rename_issues','!=',False)]}"/> |
569 | + <label for="use_issues" string="Use Issue" class="oe_edit_only oe_inline" attrs="{'invisible':[('rename_issues','==',False)]}"/> |
570 | + <label string="as:" class="oe_edit_only oe_inline"/> |
571 | + <b><field name="rename_issues" class="oe_inline"/></b> |
572 | + </div> |
573 | </xpath> |
574 | <xpath expr='//div[@name="buttons"]' position='inside'> |
575 | <button name="%(act_project_project_2_project_issue_all)d" string="Issues" type="action" attrs="{'invisible':[('use_issues','=', 0)]}"/> |
576 | @@ -340,8 +344,8 @@ |
577 | <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside"> |
578 | <a t-if="record.use_issues.raw_value" style="margin-right: 10px" |
579 | name="%(act_project_project_2_project_issue_all)d" type="action"> |
580 | - <span t-if="record.issue_count.raw_value gt 1"><field name="issue_count"/> Issues</span> |
581 | - <span t-if="record.issue_count.raw_value lt 2"><field name="issue_count"/> Issue</span> |
582 | + <span t-if="record.issue_count.raw_value gt 1"><field name="issue_count"/> <field name="rename_issues"/>s</span> |
583 | + <span t-if="record.issue_count.raw_value lt 2"><field name="issue_count"/> <field name="rename_issues"/></span> |
584 | </a> |
585 | </xpath> |
586 | </field> |
587 | @@ -354,8 +358,9 @@ |
588 | <field eval="18" name="priority"/> |
589 | <field name="arch" type="xml"> |
590 | <xpath expr='//div[@name="project"]' position='inside'> |
591 | - <field name="use_issues"/> |
592 | - <label for="use_issues"/> |
593 | + <field name="use_issues" title="Use of issue is great to communicate with your customer" class="oe_inline"/> |
594 | + <label for="use_issues" string="Issue" attrs="{'invisible':[('rename_issues','!=',False)]}"/> |
595 | + <b><field name="rename_issues" readonly="True" class="oe_inline oe_field_as_label"/></b> |
596 | </xpath> |
597 | </field> |
598 | </record> |
599 | |
600 | === added directory 'project_issue/static/src/js' |
601 | === added file 'project_issue/static/src/js/project_issue.js' |
602 | --- project_issue/static/src/js/project_issue.js 1970-01-01 00:00:00 +0000 |
603 | +++ project_issue/static/src/js/project_issue.js 2013-06-28 10:23:29 +0000 |
604 | @@ -0,0 +1,18 @@ |
605 | +openerp.project_issue = function(openerp) { |
606 | + openerp.web_kanban.KanbanGroup = openerp.web_kanban.KanbanGroup.extend({ |
607 | + start: function() { |
608 | + this._super.apply(this, arguments); |
609 | + var self = this; |
610 | + if(self.dataset.model == "project.issue") { |
611 | + self.description_field = 'description'; |
612 | + $.when(self.get_legend(self.$el.find('.oe_kanban_group_title_text'))).done(function(){ |
613 | + _.each(self.records,function(rec){ |
614 | + if(self.description_data){ |
615 | + openerp.web.show_legend(rec.$el.find('.oe_kanban_status,.oe_kanban_action'), self.description_data); |
616 | + } |
617 | + }) |
618 | + }); |
619 | + } |
620 | + } |
621 | + }); |
622 | +}; |
623 | \ No newline at end of file |