Merge lp:~openerp-dev/openobject-addons/trunk-widget-tooltip-mba into lp:openobject-addons
- trunk-widget-tooltip-mba
- Merge into trunk
Proposed by
Mahendra Barad(OpenERP)
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-widget-tooltip-mba |
Merge into: | lp:openobject-addons |
Diff against target: |
2018 lines (+574/-252) 34 files modified
crm/crm.py (+30/-5) crm/crm_lead.py (+1/-15) crm/crm_lead_data.xml (+24/-0) crm/crm_lead_demo.xml (+15/-15) crm/crm_lead_view.xml (+14/-7) crm/crm_phonecall.py (+2/-2) crm/crm_phonecall_demo.xml (+5/-5) crm/crm_phonecall_view.xml (+1/-1) crm/crm_view.xml (+49/-1) crm/report/crm_phonecall_report.py (+1/-1) crm_claim/crm_claim.py (+2/-2) crm_claim/crm_claim_demo.xml (+6/-6) crm_claim/crm_claim_view.xml (+1/-1) crm_claim/report/crm_claim_report.py (+3/-5) crm_helpdesk/crm_helpdesk.py (+2/-2) crm_helpdesk/crm_helpdesk_demo.xml (+3/-3) crm_helpdesk/crm_helpdesk_view.xml (+1/-1) hr_recruitment/hr_recruitment.py (+30/-20) hr_recruitment/hr_recruitment_data.xml (+24/-0) hr_recruitment/hr_recruitment_demo.xml (+1/-1) hr_recruitment/hr_recruitment_view.xml (+58/-17) project/project.py (+62/-29) project/project_data.xml (+33/-0) project/project_demo.xml (+7/-4) project/project_view.xml (+91/-31) project/report/project_report.py (+1/-1) project/static/src/css/project.css (+4/-0) project/static/src/js/project.js (+10/-0) project_issue/project_issue.py (+26/-27) project_issue/project_issue_data.xml (+6/-0) project_issue/project_issue_demo.xml (+13/-10) project_issue/project_issue_view.xml (+46/-38) project_issue/report/project_issue_report.py (+1/-1) project_timesheet/project_timesheet_view.xml (+1/-1) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-widget-tooltip-mba |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Richard Mathot (Odoo, formerly OpenERP) | Pending | ||
Review via email: mp+217431@code.launchpad.net |
This proposal supersedes a proposal from 2014-04-14.
Commit message
Description of the change
Hello ,
I have removed .THIS file.
Thanks
To post a comment you must log in.
Revision history for this message
Richard Mathot (Odoo, formerly OpenERP) (rim-openerp) wrote : Posted in a previous version of this proposal | # |
review:
Needs Fixing
- 9074. By Mahendra Barad(OpenERP)
-
[Merge]with trunk
- 9075. By Mahendra Barad(OpenERP)
-
[IMP]improve resolved conflict code
- 9076. By Mahendra Barad(OpenERP)
-
[Merge]with trunk
Unmerged revisions
- 9076. By Mahendra Barad(OpenERP)
-
[Merge]with trunk
- 9075. By Mahendra Barad(OpenERP)
-
[IMP]improve resolved conflict code
- 9074. By Mahendra Barad(OpenERP)
-
[Merge]with trunk
- 9073. By Mahendra Barad(OpenERP)
-
[IMP]remove .THIS file
- 9072. By Mahendra Barad(OpenERP)
-
[IMP]improve the tooltip
- 9071. By Mahendra Barad(OpenERP)
-
[Merge]with trunk
- 9070. By Mahendra Barad(OpenERP)
-
[Merge]with trunk
- 9069. By Mahendra Barad(OpenERP)
-
[IMP]currency symbol in kanban
- 9068. By Mahendra Barad(OpenERP)
-
[IMP]demo data
- 9067. By Mahendra Barad(OpenERP)
-
[Add]data for legends
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-02-11 11:09:36 +0000 |
3 | +++ crm/crm.py 2014-05-07 10:11:23 +0000 |
4 | @@ -28,11 +28,11 @@ |
5 | from openerp.osv import osv |
6 | |
7 | AVAILABLE_PRIORITIES = [ |
8 | - ('1', 'Highest'), |
9 | - ('2', 'High'), |
10 | - ('3', 'Normal'), |
11 | - ('4', 'Low'), |
12 | - ('5', 'Lowest'), |
13 | + ('0', 'Very Low'), |
14 | + ('1', 'Low'), |
15 | + ('2', 'Normal'), |
16 | + ('3', 'High'), |
17 | + ('4', 'Very High'), |
18 | ] |
19 | |
20 | class crm_case_channel(osv.osv): |
21 | @@ -57,6 +57,26 @@ |
22 | _description = "Stage of case" |
23 | _rec_name = 'name' |
24 | _order = "sequence" |
25 | + |
26 | + def _get_tooltips(self, cr, uid, ids, field, args, context=None): |
27 | + res = {} |
28 | + for rec in self.read(cr, uid, ids, ['legend_star1','legend_star2','legend_star3','legend_star4','requirements'], context=context): |
29 | + value = "" |
30 | + img = "<img src='/web/static/src/img/icons/star-on.png'/>" |
31 | + if rec['legend_star1']: |
32 | + value += img +' '+ rec['legend_star1'] + "<br/>" |
33 | + if rec['legend_star2']: |
34 | + value += img + img +' '+ rec['legend_star2'] + "<br/>" |
35 | + if rec['legend_star3']: |
36 | + value += img + img + img +' '+ rec['legend_star3'] + "<br/>" |
37 | + if rec['legend_star4']: |
38 | + value += img + img + img + img +' '+ rec['legend_star4'] + "<br/>" |
39 | + if rec['requirements']: |
40 | + value += rec['requirements'] |
41 | + tooltip = {'tooltip': value} |
42 | + tooltip.update(rec) |
43 | + res[rec['id']] = tooltip |
44 | + return res |
45 | |
46 | _columns = { |
47 | 'name': fields.char('Stage Name', size=64, required=True, translate=True), |
48 | @@ -64,6 +84,7 @@ |
49 | 'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"), |
50 | 'on_change': fields.boolean('Change Probability Automatically', help="Setting this stage will change the probability automatically on the opportunity."), |
51 | 'requirements': fields.text('Requirements'), |
52 | + 'kanban_column_tooltip': fields.function(_get_tooltips, string='Tooltips', type="char", help="This tooltips will display on kanban stage header" ), |
53 | 'section_ids': fields.many2many('crm.case.section', 'section_stage_rel', 'stage_id', 'section_id', string='Sections', |
54 | help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."), |
55 | 'case_default': fields.boolean('Default to New Sales Team', |
56 | @@ -76,6 +97,10 @@ |
57 | ('both', 'Both')], |
58 | string='Type', size=16, required=True, |
59 | help="This field is used to distinguish stages related to Leads from stages related to Opportunities, or to specify stages available for both types."), |
60 | + 'legend_star1':fields.char('Legend Star', help='This tooltip will appear on kanban view column header.'), |
61 | + 'legend_star2':fields.char('Legend Star2', help='This tooltip will appear on kanban view column header.'), |
62 | + 'legend_star3':fields.char('Legend Star3', help='This tooltip will appear on kanban view column header.'), |
63 | + 'legend_star4':fields.char('Legend Star4', help='This tooltip will appear on kanban view column header.'), |
64 | } |
65 | |
66 | _defaults = { |
67 | |
68 | === modified file 'crm/crm_lead.py' |
69 | --- crm/crm_lead.py 2014-05-02 13:07:53 +0000 |
70 | +++ crm/crm_lead.py 2014-05-07 10:11:23 +0000 |
71 | @@ -278,6 +278,7 @@ |
72 | 'partner_address_name': fields.related('partner_id', 'name', type='char', string='Partner Contact Name', readonly=True), |
73 | 'partner_address_email': fields.related('partner_id', 'email', type='char', string='Partner Contact Email', readonly=True), |
74 | 'company_currency': fields.related('company_id', 'currency_id', type='many2one', string='Currency', readonly=True, relation="res.currency"), |
75 | + 'company_currency_symbol': fields.related('company_id', 'currency_id', 'symbol', type='char', string='Symbol', readonly=True, relation="res.currency"), |
76 | 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True), |
77 | 'user_login': fields.related('user_id', 'login', type='char', string='User Login', readonly=True), |
78 | |
79 | @@ -458,21 +459,6 @@ |
80 | self.write(cr, uid, [case.id], data, context=context) |
81 | return True |
82 | |
83 | - def set_priority(self, cr, uid, ids, priority, context=None): |
84 | - """ Set lead priority |
85 | - """ |
86 | - return self.write(cr, uid, ids, {'priority': priority}, context=context) |
87 | - |
88 | - def set_high_priority(self, cr, uid, ids, context=None): |
89 | - """ Set lead priority to high |
90 | - """ |
91 | - return self.set_priority(cr, uid, ids, '1', context=context) |
92 | - |
93 | - def set_normal_priority(self, cr, uid, ids, context=None): |
94 | - """ Set lead priority to normal |
95 | - """ |
96 | - return self.set_priority(cr, uid, ids, '3', context=context) |
97 | - |
98 | def _merge_get_result_type(self, cr, uid, opps, context=None): |
99 | """ |
100 | Define the type of the result of the merge. If at least one of the |
101 | |
102 | === modified file 'crm/crm_lead_data.xml' |
103 | --- crm/crm_lead_data.xml 2014-02-21 11:29:15 +0000 |
104 | +++ crm/crm_lead_data.xml 2014-05-07 10:11:23 +0000 |
105 | @@ -10,6 +10,10 @@ |
106 | <field name="on_change">1</field> |
107 | <field name="sequence">1</field> |
108 | <field name="type">both</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_lead2"> |
115 | <field name="name">Dead</field> |
116 | @@ -26,6 +30,10 @@ |
117 | <field name="on_change">1</field> |
118 | <field name="sequence">40</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 | <record model="crm.case.stage" id="stage_lead4"> |
126 | <field name="name">Proposition</field> |
127 | @@ -33,6 +41,10 @@ |
128 | <field name="probability">40</field> |
129 | <field name="sequence">50</field> |
130 | <field name="type">opportunity</field> |
131 | + <field name="legend_star1">Low priority</field> |
132 | + <field name="legend_star2">Normal priority</field> |
133 | + <field name="legend_star3">High priority</field> |
134 | + <field name="legend_star4">Highest priority</field> |
135 | </record> |
136 | <record model="crm.case.stage" id="stage_lead5"> |
137 | <field name="name">Negotiation</field> |
138 | @@ -40,6 +52,10 @@ |
139 | <field name="probability">60</field> |
140 | <field name="sequence">60</field> |
141 | <field name="type">opportunity</field> |
142 | + <field name="legend_star1">Low priority</field> |
143 | + <field name="legend_star2">Normal priority</field> |
144 | + <field name="legend_star3">High priority</field> |
145 | + <field name="legend_star4">Highest priority</field> |
146 | </record> |
147 | <record model="crm.case.stage" id="stage_lead6"> |
148 | <field name="name">Won</field> |
149 | @@ -49,6 +65,10 @@ |
150 | <field name="on_change">1</field> |
151 | <field name="sequence">70</field> |
152 | <field name="type">opportunity</field> |
153 | + <field name="legend_star1">Low priority</field> |
154 | + <field name="legend_star2">Normal priority</field> |
155 | + <field name="legend_star3">High priority</field> |
156 | + <field name="legend_star4">Highest priority</field> |
157 | </record> |
158 | <record model="crm.case.stage" id="stage_lead7"> |
159 | <field name="name">Lost</field> |
160 | @@ -58,6 +78,10 @@ |
161 | <field name="on_change">1</field> |
162 | <field name="sequence">80</field> |
163 | <field name="type">opportunity</field> |
164 | + <field name="legend_star1">Low priority</field> |
165 | + <field name="legend_star2">Normal priority</field> |
166 | + <field name="legend_star3">High priority</field> |
167 | + <field name="legend_star4">Highest priority</field> |
168 | </record> |
169 | |
170 | <record model="crm.case.section" id="section_sales_department"> |
171 | |
172 | === modified file 'crm/crm_lead_demo.xml' |
173 | --- crm/crm_lead_demo.xml 2013-10-27 12:31:04 +0000 |
174 | +++ crm/crm_lead_demo.xml 2014-05-07 10:11:23 +0000 |
175 | @@ -54,7 +54,7 @@ |
176 | <field name="type_id" ref="type_lead7"/> |
177 | <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/> |
178 | <field name="channel_id" ref="crm_case_channel_website"/> |
179 | - <field name="priority">4</field> |
180 | + <field name="priority">1</field> |
181 | <field name="section_id" ref="section_sales_department"/> |
182 | <field name="user_id" ref="base.user_root"/> |
183 | <field name="stage_id" ref="stage_lead1"/> |
184 | @@ -104,7 +104,7 @@ |
185 | <field name="type_id" ref="type_lead8"/> |
186 | <field name="categ_ids" eval="[(6, 0, [categ_oppor5])]"/> |
187 | <field name="channel_id" ref=""/> |
188 | - <field name="priority">3</field> |
189 | + <field name="priority">2</field> |
190 | <field name="section_id" ref="crm_case_section_2"/> |
191 | <field name="user_id" ref="base.user_demo"/> |
192 | <field name="stage_id" ref="stage_lead6"/> |
193 | @@ -129,7 +129,7 @@ |
194 | <field name="type_id" ref="type_lead3"/> |
195 | <field name="categ_ids" eval="[(6, 0, [categ_oppor1])]"/> |
196 | <field name="channel_id" ref="crm_case_channel_website"/> |
197 | - <field name="priority">3</field> |
198 | + <field name="priority">2</field> |
199 | <field name="section_id" ref="crm_case_section_1"/> |
200 | <field name="user_id" ref=""/> |
201 | <field name="stage_id" ref="stage_lead1"/> |
202 | @@ -156,7 +156,7 @@ |
203 | <field name="type_id" ref="type_lead3"/> |
204 | <field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/> |
205 | <field name="channel_id" ref=""/> |
206 | - <field name="priority">3</field> |
207 | + <field name="priority">2</field> |
208 | <field name="section_id" ref="crm_case_section_2"/> |
209 | <field name="user_id" ref=""/> |
210 | <field name="stage_id" ref="stage_lead1"/> |
211 | @@ -174,7 +174,7 @@ |
212 | <field name="type_id" ref="type_lead8"/> |
213 | <field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/> |
214 | <field name="channel_id" ref=""/> |
215 | - <field name="priority">5</field> |
216 | + <field name="priority">0</field> |
217 | <field name="section_id" ref="crm_case_section_2"/> |
218 | <field name="user_id" ref="base.user_root"/> |
219 | <field name="stage_id" ref="stage_lead1"/> |
220 | @@ -193,7 +193,7 @@ |
221 | <field name="type_id" ref="type_lead5"/> |
222 | <field name="categ_ids" eval="[(6, 0, [categ_oppor6,categ_oppor8])]"/> |
223 | <field name="channel_id" ref=""/> |
224 | - <field name="priority">4</field> |
225 | + <field name="priority">1</field> |
226 | <field name="section_id" ref="section_sales_department"/> |
227 | <field name="user_id" ref="base.user_root"/> |
228 | <field name="stage_id" ref="stage_lead1"/> |
229 | @@ -253,7 +253,7 @@ |
230 | <field name="type_id" ref="type_lead3"/> |
231 | <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/> |
232 | <field name="channel_id" ref="crm_case_channel_direct"/> |
233 | - <field name="priority">3</field> |
234 | + <field name="priority">2</field> |
235 | <field name="section_id" ref="crm_case_section_1"/> |
236 | <field name="user_id" ref=""/> |
237 | <field name="stage_id" ref="stage_lead1"/> |
238 | @@ -331,7 +331,7 @@ |
239 | <field name="type_id" ref="type_lead3"/> |
240 | <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/> |
241 | <field name="channel_id" ref="crm_case_channel_website"/> |
242 | - <field name="priority">3</field> |
243 | + <field name="priority">2</field> |
244 | <field eval="time.strftime('%Y-%m-23')" name="date_deadline"/> |
245 | <field eval="time.strftime('%Y-%m-10')" name="date_action"/> |
246 | <field name="title_action">Send Catalogue by Email</field> |
247 | @@ -404,7 +404,7 @@ |
248 | <field name="type_id" ref="type_lead3"/> |
249 | <field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/> |
250 | <field name="channel_id" ref="crm_case_channel_website"/> |
251 | - <field name="priority">4</field> |
252 | + <field name="priority">1</field> |
253 | <field eval="time.strftime('%Y-%m-8')" name="date_deadline"/> |
254 | <field eval="time.strftime('%Y-%m-3')" name="date_action"/> |
255 | <field name="title_action">Send price list regarding our interventions</field> |
256 | @@ -431,7 +431,7 @@ |
257 | <field name="partner_id" ref="base.res_partner_4"/> |
258 | <field name="type_id" ref="type_lead8"/> |
259 | <field name="categ_ids" eval="[(6, 0, [categ_oppor4,categ_oppor6])]"/> |
260 | - <field name="priority">4</field> |
261 | + <field name="priority">1</field> |
262 | <field eval="time.strftime('%Y-%m-13')" name="date_deadline"/> |
263 | <field eval="time.strftime('%Y-%m-4')" name="date_action"/> |
264 | <field name="title_action">Call to define real needs about training</field> |
265 | @@ -492,7 +492,7 @@ |
266 | <field name="type_id" ref="type_lead2"/> |
267 | <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/> |
268 | <field name="channel_id" ref="crm_case_channel_phone"/> |
269 | - <field name="priority">3</field> |
270 | + <field name="priority">2</field> |
271 | <field name="section_id" ref="crm_case_section_2"/> |
272 | <field name="user_id" ref="base.user_root"/> |
273 | <field name="stage_id" ref="crm.stage_lead4"/> |
274 | @@ -510,7 +510,7 @@ |
275 | <field name="type_id" ref="type_lead7"/> |
276 | <field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/> |
277 | <field name="channel_id" ref="crm_case_channel_email"/> |
278 | - <field name="priority">3</field> |
279 | + <field name="priority">1</field> |
280 | <field name="section_id" ref="crm_case_section_2"/> |
281 | <field name="user_id" ref="base.user_root"/> |
282 | <field name="stage_id" ref="crm.stage_lead5"/> |
283 | @@ -525,7 +525,7 @@ |
284 | <field name="type_id" ref="type_lead5"/> |
285 | <field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/> |
286 | <field name="channel_id" ref="crm_case_channel_direct"/> |
287 | - <field name="priority">5</field> |
288 | + <field name="priority">0</field> |
289 | <field name="section_id" ref="section_sales_department"/> |
290 | <field name="user_id" ref="base.user_demo"/> |
291 | <field name="stage_id" ref="crm.stage_lead5"/> |
292 | @@ -543,7 +543,7 @@ |
293 | <field name="type_id" ref="type_lead8"/> |
294 | <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/> |
295 | <field name="channel_id" ref="crm_case_channel_website"/> |
296 | - <field name="priority">5</field> |
297 | + <field name="priority">0</field> |
298 | <field eval="time.strftime('%Y-%m-6')" name="date_deadline"/> |
299 | <field name="section_id" ref="section_sales_department"/> |
300 | <field name="user_id" ref="base.user_root"/> |
301 | @@ -588,7 +588,7 @@ |
302 | <field name="type_id" ref="type_lead3"/> |
303 | <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/> |
304 | <field name="channel_id" ref="crm_case_channel_website"/> |
305 | - <field name="priority">3</field> |
306 | + <field name="priority">2</field> |
307 | <field eval="time.strftime('%Y-%m-23')" name="date_deadline"/> |
308 | <field eval="time.strftime('%Y-%m-10')" name="date_action"/> |
309 | <field name="title_action">Send Catalogue by Email</field> |
310 | |
311 | === modified file 'crm/crm_lead_view.xml' |
312 | --- crm/crm_lead_view.xml 2014-05-02 13:22:58 +0000 |
313 | +++ crm/crm_lead_view.xml 2014-05-07 10:11:23 +0000 |
314 | @@ -158,7 +158,7 @@ |
315 | <field name="type" invisible="1"/> |
316 | </group> |
317 | <group> |
318 | - <field name="priority"/> |
319 | + <field name="priority" widget="priority"/> |
320 | <field name="categ_ids" |
321 | widget="many2many_tags" |
322 | domain="[('object_id.model','=','crm.lead')]" |
323 | @@ -261,7 +261,7 @@ |
324 | <field name="model">crm.lead</field> |
325 | <field name="arch" type="xml"> |
326 | <kanban default_group_by="stage_id"> |
327 | - <field name="stage_id"/> |
328 | + <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/> |
329 | <field name="color"/> |
330 | <field name="priority"/> |
331 | <field name="planned_revenue" sum="Expected Revenues"/> |
332 | @@ -290,7 +290,7 @@ |
333 | <b><field name="name"/></b> |
334 | <t t-if="record.planned_revenue.raw_value"> |
335 | - <b><t t-esc="record.planned_revenue.value"/> |
336 | - <field name="company_currency"/></b> |
337 | + <field name="company_currency_symbol"/></b> |
338 | </t> |
339 | </div> |
340 | <div> |
341 | @@ -303,9 +303,16 @@ |
342 | <field name="title_action"/> |
343 | </div> |
344 | <div class="oe_kanban_bottom_right"> |
345 | - <a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a> |
346 | - <a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a> |
347 | - <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" t-if="record.user_id.value"/> |
348 | + <table> |
349 | + <tr> |
350 | + <td groups="base.group_user"> |
351 | + <field name="priority" widget="priority"/> |
352 | + </td> |
353 | + <td> |
354 | + <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"/> |
355 | + </td> |
356 | + </tr> |
357 | + </table> |
358 | </div> |
359 | <div class="oe_kanban_footer_left"> |
360 | <t t-raw="record.message_summary.raw_value"/> |
361 | @@ -430,7 +437,7 @@ |
362 | <field name="title_action" class="oe_inline" nolabel="1" placeholder="e.g. Call for proposal"/> |
363 | </div> |
364 | <field name="date_deadline"/> |
365 | - <field name="priority"/> |
366 | + <field name="priority" widget="priority"/> |
367 | </group> |
368 | |
369 | <group> |
370 | |
371 | === modified file 'crm/crm_phonecall.py' |
372 | --- crm/crm_phonecall.py 2014-03-24 13:56:21 +0000 |
373 | +++ crm/crm_phonecall.py 2014-05-07 10:11:23 +0000 |
374 | @@ -70,7 +70,7 @@ |
375 | ('object_id.model', '=', 'crm.phonecall')]"), |
376 | 'partner_phone': fields.char('Phone', size=32), |
377 | 'partner_mobile': fields.char('Mobile', size=32), |
378 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
379 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
380 | 'date_closed': fields.datetime('Closed', readonly=True), |
381 | 'date': fields.datetime('Date'), |
382 | 'opportunity_id': fields.many2one ('crm.lead', 'Lead/Opportunity'), |
383 | @@ -85,7 +85,7 @@ |
384 | |
385 | _defaults = { |
386 | 'date': fields.datetime.now, |
387 | - 'priority': crm.AVAILABLE_PRIORITIES[2][0], |
388 | + 'priority': '1', |
389 | 'state': _get_default_state, |
390 | 'user_id': lambda self, cr, uid, ctx: uid, |
391 | 'active': 1 |
392 | |
393 | === modified file 'crm/crm_phonecall_demo.xml' |
394 | --- crm/crm_phonecall_demo.xml 2013-10-27 12:31:04 +0000 |
395 | +++ crm/crm_phonecall_demo.xml 2014-05-07 10:11:23 +0000 |
396 | @@ -6,7 +6,7 @@ |
397 | <record id="crm_phonecall_1" model="crm.phonecall"> |
398 | <field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/> |
399 | <field name="partner_id" ref="base.res_partner_11"/> |
400 | - <field eval="'3'" name="priority"/> |
401 | + <field eval="'1'" name="priority"/> |
402 | <field name="user_id" ref="base.user_root"/> |
403 | <field name="name">Left the message</field> |
404 | <field name="state">done</field> |
405 | @@ -19,7 +19,7 @@ |
406 | <record id="crm_phonecall_2" model="crm.phonecall"> |
407 | <field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/> |
408 | <field name="partner_id" ref="base.res_partner_7"/> |
409 | - <field eval="'4'" name="priority"/> |
410 | + <field eval="'0'" name="priority"/> |
411 | <field name="user_id" ref="base.user_root"/> |
412 | <field name="name">Need more information on the proposed deal</field> |
413 | <field name="state">done</field> |
414 | @@ -44,7 +44,7 @@ |
415 | </record> |
416 | <record id="crm_phonecall_4" model="crm.phonecall"> |
417 | <field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/> |
418 | - <field eval="'3'" name="priority"/> |
419 | + <field eval="'1'" name="priority"/> |
420 | <field name="user_id" ref="base.user_root"/> |
421 | <field name="name">Wanted information about pricing of laptops</field> |
422 | <field name="state">done</field> |
423 | @@ -58,7 +58,7 @@ |
424 | <record id="crm_phonecall_5" model="crm.phonecall"> |
425 | <field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/> |
426 | <field name="partner_id" ref="base.res_partner_5"/> |
427 | - <field eval="'3'" name="priority"/> |
428 | + <field eval="'1'" name="priority"/> |
429 | <field name="user_id" ref="base.user_root"/> |
430 | <field name="name">More information on the proposed deal</field> |
431 | <field name="state">pending</field> |
432 | @@ -69,7 +69,7 @@ |
433 | <field eval="2.08" name="duration"/> |
434 | </record> |
435 | <record id="crm_phonecall_6" model="crm.phonecall"> |
436 | - <field eval="'3'" name="priority"/> |
437 | + <field eval="'1'" name="priority"/> |
438 | <field name="user_id" ref="base.user_root"/> |
439 | <field name="name">Proposal for discount offer</field> |
440 | <field name="state">open</field> |
441 | |
442 | === modified file 'crm/crm_phonecall_view.xml' |
443 | --- crm/crm_phonecall_view.xml 2014-05-02 13:07:53 +0000 |
444 | +++ crm/crm_phonecall_view.xml 2014-05-07 10:11:23 +0000 |
445 | @@ -103,7 +103,7 @@ |
446 | <field name="categ_id" widget="selection" |
447 | domain="[('object_id.model', '=', 'crm.phonecall')]"/> |
448 | <field name="partner_mobile"/> |
449 | - <field name="priority"/> |
450 | + <field name="priority" widget="priority"/> |
451 | <field name="opportunity_id" on_change="on_change_opportunity(opportunity_id)"/> |
452 | </group> |
453 | <field name="description" placeholder="Description..."/> |
454 | |
455 | === modified file 'crm/crm_view.xml' |
456 | --- crm/crm_view.xml 2013-12-10 09:33:07 +0000 |
457 | +++ crm/crm_view.xml 2014-05-07 10:11:23 +0000 |
458 | @@ -107,9 +107,57 @@ |
459 | </group> |
460 | |
461 | </group> |
462 | + <div attrs="{'invisible':[('type','=', 'lead')]}"> |
463 | + <separator string="Legend"/> |
464 | + <p>The legend will appear as tooltip of each column of the opportunities pipe.</p> |
465 | + <div> |
466 | + <group col="3"> |
467 | + <div width="57"> |
468 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7</span> |
469 | + </div> |
470 | + <div width="400"> |
471 | + <field name="legend_star1"/> |
472 | + </div> |
473 | + <div></div> |
474 | + </group> |
475 | + </div> |
476 | + <div> |
477 | + <group col="3"> |
478 | + <div width="57"> |
479 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">77</span> |
480 | + </div> |
481 | + <div width="400"> |
482 | + <field name="legend_star2"/> |
483 | + </div> |
484 | + <div></div> |
485 | + </group> |
486 | + </div> |
487 | + <div> |
488 | + <group col="3"> |
489 | + <div width="57"> |
490 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">777</span> |
491 | + </div> |
492 | + <div width="400"> |
493 | + <field name="legend_star3"/> |
494 | + </div> |
495 | + <div></div> |
496 | + </group> |
497 | + </div> |
498 | + <div> |
499 | + <group col="3"> |
500 | + <div width="57"> |
501 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7777</span> |
502 | + </div> |
503 | + <div width="400"> |
504 | + <field name="legend_star4"/> |
505 | + </div> |
506 | + <div></div> |
507 | + </group> |
508 | + </div> |
509 | + </div> |
510 | + <field name="section_ids" invisible="1"/> |
511 | <separator string="Requirements"/> |
512 | <field name="requirements" nolabel="1"/> |
513 | - <field name="section_ids" invisible="1"/> |
514 | </form> |
515 | </field> |
516 | </record> |
517 | |
518 | === modified file 'crm/report/crm_phonecall_report.py' |
519 | --- crm/report/crm_phonecall_report.py 2014-01-29 09:56:55 +0000 |
520 | +++ crm/report/crm_phonecall_report.py 2014-05-07 10:11:23 +0000 |
521 | @@ -42,7 +42,7 @@ |
522 | _columns = { |
523 | 'user_id':fields.many2one('res.users', 'User', readonly=True), |
524 | 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), |
525 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
526 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
527 | 'nbr': fields.integer('# of Cases', readonly=True), |
528 | 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True), |
529 | 'create_date': fields.datetime('Create Date', readonly=True, select=True), |
530 | |
531 | === modified file 'crm_claim/crm_claim.py' |
532 | --- crm_claim/crm_claim.py 2014-03-24 05:09:21 +0000 |
533 | +++ crm_claim/crm_claim.py 2014-05-07 10:11:23 +0000 |
534 | @@ -88,7 +88,7 @@ |
535 | 'categ_id': fields.many2one('crm.case.categ', 'Category', \ |
536 | domain="[('section_id','=',section_id),\ |
537 | ('object_id.model', '=', 'crm.claim')]"), |
538 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
539 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
540 | 'type_action': fields.selection([('correction','Corrective Action'),('prevention','Preventive Action')], 'Action Type'), |
541 | 'user_id': fields.many2one('res.users', 'Responsible'), |
542 | 'user_fault': fields.char('Trouble Responsible', size=64), |
543 | @@ -111,7 +111,7 @@ |
544 | 'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c), |
545 | 'date': fields.datetime.now, |
546 | 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c), |
547 | - 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], |
548 | + 'priority': '1', |
549 | 'active': lambda *a: 1, |
550 | 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c) |
551 | } |
552 | |
553 | === modified file 'crm_claim/crm_claim_demo.xml' |
554 | --- crm_claim/crm_claim_demo.xml 2012-11-29 22:26:45 +0000 |
555 | +++ crm_claim/crm_claim_demo.xml 2014-05-07 10:11:23 +0000 |
556 | @@ -9,7 +9,7 @@ |
557 | <record id="crm_claim_1" model="crm.claim"> |
558 | <field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/> |
559 | <field name="partner_id" ref="base.res_partner_11"/> |
560 | - <field eval=""3"" name="priority"/> |
561 | + <field eval=""1"" name="priority"/> |
562 | <field name="user_id" ref="base.user_root"/> |
563 | <field eval=""Problem with the delivery of goods"" name="name"/> |
564 | <field name="section_id" ref="crm.section_sales_department"/> |
565 | @@ -21,7 +21,7 @@ |
566 | <record id="crm_claim_2" model="crm.claim"> |
567 | <field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/> |
568 | <field name="partner_id" ref="base.res_partner_6"/> |
569 | - <field eval=""4"" name="priority"/> |
570 | + <field eval=""0"" name="priority"/> |
571 | <field name="user_id" ref="base.user_root"/> |
572 | <field eval=""Damaged Products"" name="name"/> |
573 | <field name="section_id" ref="crm.section_sales_department"/> |
574 | @@ -46,7 +46,7 @@ |
575 | <record id="crm_claim_4" model="crm.claim"> |
576 | <field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/> |
577 | <field name="partner_id" ref="base.res_partner_18"/> |
578 | - <field eval=""3"" name="priority"/> |
579 | + <field eval=""1"" name="priority"/> |
580 | <field name="user_id" ref="base.user_root"/> |
581 | <field eval=""Product quality not maintained"" name="name"/> |
582 | <field name="section_id" ref="crm.section_sales_department"/> |
583 | @@ -58,7 +58,7 @@ |
584 | <record id="crm_claim_5" model="crm.claim"> |
585 | <field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/> |
586 | <field name="partner_id" ref="base.res_partner_5"/> |
587 | - <field eval=""3"" name="priority"/> |
588 | + <field eval=""1"" name="priority"/> |
589 | <field name="user_id" ref="base.user_root"/> |
590 | <field eval=""Some products missing"" name="name"/> |
591 | <field name="section_id" ref="crm.section_sales_department"/> |
592 | @@ -69,7 +69,7 @@ |
593 | |
594 | <record id="crm_claim_6" model="crm.claim"> |
595 | <field name="partner_id" ref="base.res_partner_9"/> |
596 | - <field eval=""3"" name="priority"/> |
597 | + <field eval=""1"" name="priority"/> |
598 | <field name="user_id" ref="base.user_root"/> |
599 | <field eval=""Problem with the delivery of assignments"" name="name"/> |
600 | <field name="section_id" ref="crm.section_sales_department"/> |
601 | @@ -82,7 +82,7 @@ |
602 | |
603 | <record id="crm_claim_7" model="crm.claim"> |
604 | <field name="partner_id" ref="base.res_partner_19"/> |
605 | - <field eval=""3"" name="priority"/> |
606 | + <field eval=""1"" name="priority"/> |
607 | <field name="user_id" ref="base.user_root"/> |
608 | <field eval=""Documents unclear"" name="name"/> |
609 | <field name="section_id" ref="crm.section_sales_department"/> |
610 | |
611 | === modified file 'crm_claim/crm_claim_view.xml' |
612 | --- crm_claim/crm_claim_view.xml 2013-10-27 12:31:04 +0000 |
613 | +++ crm_claim/crm_claim_view.xml 2014-05-07 10:11:23 +0000 |
614 | @@ -107,7 +107,7 @@ |
615 | </group> |
616 | <group colspan="4" col="4" groups="base.group_user"> |
617 | <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/> |
618 | - <field name="priority"/> |
619 | + <field name="priority" widget="priority"/> |
620 | <field name="section_id" groups="base.group_multi_salesteams"/> |
621 | <field name="date_deadline"/> |
622 | </group> |
623 | |
624 | === modified file 'crm_claim/report/crm_claim_report.py' |
625 | --- crm_claim/report/crm_claim_report.py 2013-10-27 12:31:04 +0000 |
626 | +++ crm_claim/report/crm_claim_report.py 2014-05-07 10:11:23 +0000 |
627 | @@ -23,11 +23,9 @@ |
628 | from openerp import tools |
629 | |
630 | AVAILABLE_PRIORITIES = [ |
631 | - ('5', 'Lowest'), |
632 | - ('4', 'Low'), |
633 | - ('3', 'Normal'), |
634 | - ('2', 'High'), |
635 | - ('1', 'Highest') |
636 | + ('0', 'Low'), |
637 | + ('1', 'Normal'), |
638 | + ('2', 'High') |
639 | ] |
640 | |
641 | |
642 | |
643 | === modified file 'crm_helpdesk/crm_helpdesk.py' |
644 | --- crm_helpdesk/crm_helpdesk.py 2013-11-27 15:32:57 +0000 |
645 | +++ crm_helpdesk/crm_helpdesk.py 2014-05-07 10:11:23 +0000 |
646 | @@ -59,7 +59,7 @@ |
647 | 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."), |
648 | 'planned_revenue': fields.float('Planned Revenue'), |
649 | 'planned_cost': fields.float('Planned Costs'), |
650 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
651 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
652 | 'probability': fields.float('Probability (%)'), |
653 | 'categ_id': fields.many2one('crm.case.categ', 'Category', \ |
654 | domain="['|',('section_id','=',False),('section_id','=',section_id),\ |
655 | @@ -83,7 +83,7 @@ |
656 | 'state': lambda *a: 'draft', |
657 | 'date': fields.datetime.now, |
658 | 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c), |
659 | - 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], |
660 | + 'priority': '1', |
661 | } |
662 | |
663 | def on_change_partner_id(self, cr, uid, ids, partner_id, context=None): |
664 | |
665 | === modified file 'crm_helpdesk/crm_helpdesk_demo.xml' |
666 | --- crm_helpdesk/crm_helpdesk_demo.xml 2012-11-29 22:26:45 +0000 |
667 | +++ crm_helpdesk/crm_helpdesk_demo.xml 2014-05-07 10:11:23 +0000 |
668 | @@ -5,7 +5,7 @@ |
669 | <field eval="1" name="active"/> |
670 | <field name="user_id" ref="base.user_root"/> |
671 | <field name="company_id" ref="base.main_company"/> |
672 | - <field name="priority">3</field> |
673 | + <field name="priority">1</field> |
674 | <field name="state">draft</field> |
675 | <field name="section_id" ref="crm.section_sales_department"/> |
676 | <field name="date" eval="time.strftime('%Y-%m-04 11:10:36')"/> |
677 | @@ -17,7 +17,7 @@ |
678 | <field eval="1" name="active"/> |
679 | <field name="user_id" ref="base.user_demo"/> |
680 | <field name="company_id" ref="base.main_company"/> |
681 | - <field name="priority">3</field> |
682 | + <field name="priority">1</field> |
683 | <field name="state">draft</field> |
684 | <field name="section_id" ref="crm.section_sales_department"/> |
685 | <field name="date" eval="time.strftime('%Y-%m-12 11:12:09')"/> |
686 | @@ -42,7 +42,7 @@ |
687 | <field name="partner_id" ref="base.res_partner_2"/> |
688 | <field name="user_id" ref="base.user_root"/> |
689 | <field name="company_id" ref="base.main_company"/> |
690 | - <field name="priority">3</field> |
691 | + <field name="priority">1</field> |
692 | <field name="state">draft</field> |
693 | <field name="date" eval="time.strftime('%Y-%m-12 11:15:17')"/> |
694 | <field name="name">How to create a new module</field> |
695 | |
696 | === modified file 'crm_helpdesk/crm_helpdesk_view.xml' |
697 | --- crm_helpdesk/crm_helpdesk_view.xml 2014-04-17 11:26:55 +0000 |
698 | +++ crm_helpdesk/crm_helpdesk_view.xml 2014-05-07 10:11:23 +0000 |
699 | @@ -51,7 +51,7 @@ |
700 | <field name="email_from"/> |
701 | </group> |
702 | <group string="Categorization"> |
703 | - <field name="priority"/> |
704 | + <field name="priority" widget="priority"/> |
705 | <field name="categ_id" domain="[('object_id.model', '=', 'crm.helpdesk')]" context="{'object_name': 'crm.helpdesk'}"/> |
706 | <field name="channel_id"/> |
707 | </group> |
708 | |
709 | === modified file 'hr_recruitment/hr_recruitment.py' |
710 | --- hr_recruitment/hr_recruitment.py 2014-04-17 06:53:56 +0000 |
711 | +++ hr_recruitment/hr_recruitment.py 2014-05-07 10:11:23 +0000 |
712 | @@ -25,12 +25,11 @@ |
713 | |
714 | |
715 | AVAILABLE_PRIORITIES = [ |
716 | - ('', ''), |
717 | - ('5', 'Not Good'), |
718 | - ('4', 'On Average'), |
719 | + ('0', 'Bad'), |
720 | + ('1', 'Below Average'), |
721 | + ('2', 'Average'), |
722 | ('3', 'Good'), |
723 | - ('2', 'Very Good'), |
724 | - ('1', 'Excellent') |
725 | + ('4', 'Excellent') |
726 | ] |
727 | |
728 | class hr_recruitment_source(osv.osv): |
729 | @@ -46,6 +45,27 @@ |
730 | _name = "hr.recruitment.stage" |
731 | _description = "Stage of Recruitment" |
732 | _order = 'sequence' |
733 | + |
734 | + def _get_tooltips(self, cr, uid, ids, field, args, context=None): |
735 | + res = {} |
736 | + for rec in self.read(cr, uid, ids, ['legend_star1','legend_star2','legend_star3','legend_star4','requirements'], context=context): |
737 | + value = "" |
738 | + img = "<img src='/web/static/src/img/icons/star-on.png'/>" |
739 | + if rec['legend_star1']: |
740 | + value += img +' '+ rec['legend_star1'] + "<br/>" |
741 | + if rec['legend_star2']: |
742 | + value += img + img +' '+ rec['legend_star2'] + "<br/>" |
743 | + if rec['legend_star3']: |
744 | + value += img + img + img +' '+ rec['legend_star3'] + "<br/>" |
745 | + if rec['legend_star4']: |
746 | + value += img + img + img + img +' '+ rec['legend_star4'] + "<br/>" |
747 | + if rec['requirements']: |
748 | + value += rec['requirements'] |
749 | + tooltip = {'tooltip': value} |
750 | + tooltip.update(rec) |
751 | + res[rec['id']] = tooltip |
752 | + return res |
753 | + |
754 | _columns = { |
755 | 'name': fields.char('Name', size=64, required=True, translate=True), |
756 | 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of stages."), |
757 | @@ -55,6 +75,11 @@ |
758 | 'fold': fields.boolean('Folded in Kanban View', |
759 | help='This stage is folded in the kanban view when' |
760 | 'there are no records in that stage to display.'), |
761 | + 'kanban_column_tooltip': fields.function(_get_tooltips, string='Tooltips', type="char", help="This tooltips will display on kanban stage header" ), |
762 | + 'legend_star1':fields.char('Legend Star', help='This tooltip will appear on kanban view column header.'), |
763 | + 'legend_star2':fields.char('Legend Star2', help='This tooltip will appear on kanban view column header.'), |
764 | + 'legend_star3':fields.char('Legend Star3', help='This tooltip will appear on kanban view column header.'), |
765 | + 'legend_star4':fields.char('Legend Star4', help='This tooltip will appear on kanban view column header.'), |
766 | } |
767 | _defaults = { |
768 | 'sequence': 1, |
769 | @@ -489,21 +514,6 @@ |
770 | dict_act_window['view_mode'] = 'form,tree' |
771 | return dict_act_window |
772 | |
773 | - def set_priority(self, cr, uid, ids, priority, *args): |
774 | - """Set applicant priority |
775 | - """ |
776 | - return self.write(cr, uid, ids, {'priority': priority}) |
777 | - |
778 | - def set_high_priority(self, cr, uid, ids, *args): |
779 | - """Set applicant priority to high |
780 | - """ |
781 | - return self.set_priority(cr, uid, ids, '1') |
782 | - |
783 | - def set_normal_priority(self, cr, uid, ids, *args): |
784 | - """Set applicant priority to normal |
785 | - """ |
786 | - return self.set_priority(cr, uid, ids, '3') |
787 | - |
788 | def get_empty_list_help(self, cr, uid, help, context=None): |
789 | context['empty_list_help_model'] = 'hr.job' |
790 | context['empty_list_help_id'] = context.get('default_job_id', None) |
791 | |
792 | === modified file 'hr_recruitment/hr_recruitment_data.xml' |
793 | --- hr_recruitment/hr_recruitment_data.xml 2014-02-12 09:56:06 +0000 |
794 | +++ hr_recruitment/hr_recruitment_data.xml 2014-05-07 10:11:23 +0000 |
795 | @@ -92,30 +92,54 @@ |
796 | <record model="hr.recruitment.stage" id="stage_job1"> |
797 | <field name="name">Initial Qualification</field> |
798 | <field name="sequence">1</field> |
799 | + <field name="legend_star1">Average</field> |
800 | + <field name="legend_star2">Correspond to the job requirements</field> |
801 | + <field name="legend_star3">Nice to have skills</field> |
802 | + <field name="legend_star4">Excellent</field> |
803 | </record> |
804 | <record model="hr.recruitment.stage" id="stage_job2"> |
805 | <field name="name">First Interview</field> |
806 | <field name="template_id" ref="applicant_interest"/> |
807 | <field name="sequence">2</field> |
808 | + <field name="legend_star1">Average</field> |
809 | + <field name="legend_star2">Good</field> |
810 | + <field name="legend_star3">Very Good</field> |
811 | + <field name="legend_star4">Excellent</field> |
812 | </record> |
813 | <record model="hr.recruitment.stage" id="stage_job3"> |
814 | <field name="name">Second Interview</field> |
815 | <field name="sequence">3</field> |
816 | + <field name="legend_star1">Average</field> |
817 | + <field name="legend_star2">Good at required skills</field> |
818 | + <field name="legend_star3">Expert in required skills</field> |
819 | + <field name="legend_star4">Excellent in all the skills</field> |
820 | </record> |
821 | <record model="hr.recruitment.stage" id="stage_job4"> |
822 | <field name="name">Contract Proposed</field> |
823 | <field name="sequence">4</field> |
824 | + <field name="legend_star1">Average</field> |
825 | + <field name="legend_star2">Good</field> |
826 | + <field name="legend_star3">Very Good</field> |
827 | + <field name="legend_star4">Excellent</field> |
828 | </record> |
829 | <record model="hr.recruitment.stage" id="stage_job5"> |
830 | <field name="name">Contract Signed</field> |
831 | <field name="sequence">5</field> |
832 | <field name="fold" eval="True"/> |
833 | + <field name="legend_star1">Average</field> |
834 | + <field name="legend_star2">Good</field> |
835 | + <field name="legend_star3">Very Good</field> |
836 | + <field name="legend_star4">Excellent</field> |
837 | </record> |
838 | <record model="hr.recruitment.stage" id="stage_job6"> |
839 | <field name="name">Refused</field> |
840 | <field name="sequence">6</field> |
841 | <field name="template_id" ref="applicant_refuse"/> |
842 | <field name="fold" eval="True"/> |
843 | + <field name="legend_star1">Average</field> |
844 | + <field name="legend_star2">Good</field> |
845 | + <field name="legend_star3">Very Good</field> |
846 | + <field name="legend_star4">Excellent</field> |
847 | </record> |
848 | |
849 | <record id="mail_alias_jobs" model="mail.alias"> |
850 | |
851 | === modified file 'hr_recruitment/hr_recruitment_demo.xml' |
852 | --- hr_recruitment/hr_recruitment_demo.xml 2014-02-12 09:56:06 +0000 |
853 | +++ hr_recruitment/hr_recruitment_demo.xml 2014-05-07 10:11:23 +0000 |
854 | @@ -75,7 +75,7 @@ |
855 | <field name="type_id" ref="degree_licenced"/> |
856 | <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_reserve')])]"/> |
857 | <field name="user_id" ref="base.user_root"/> |
858 | - <field name="priority">4</field> |
859 | + <field name="priority">2</field> |
860 | <field name="partner_name">David Armstrong</field> |
861 | <field name="stage_id" ref="stage_job2"/> |
862 | <field name="partner_phone">33968745</field> |
863 | |
864 | === modified file 'hr_recruitment/hr_recruitment_view.xml' |
865 | --- hr_recruitment/hr_recruitment_view.xml 2014-04-15 15:01:46 +0000 |
866 | +++ hr_recruitment/hr_recruitment_view.xml 2014-05-07 10:11:23 +0000 |
867 | @@ -130,7 +130,7 @@ |
868 | <field name="date_action"/> |
869 | <field name="title_action" class="oe_inline" placeholder="e.g. Call for interview"/> |
870 | </div> |
871 | - <field name="priority"/> |
872 | + <field name="priority" widget="priority"/> |
873 | <field name="source_id"/> |
874 | <field name="reference"/> |
875 | </group> |
876 | @@ -246,7 +246,7 @@ |
877 | <field name="model">hr.applicant</field> |
878 | <field name="arch" type="xml"> |
879 | <kanban default_group_by="stage_id"> |
880 | - <field name="stage_id"/> |
881 | + <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/> |
882 | <field name="color"/> |
883 | <field name="priority"/> |
884 | <field name="survey"/> |
885 | @@ -294,21 +294,16 @@ |
886 | </div> |
887 | <div style="width:240px"><field name="categ_ids"/></div> |
888 | <div class="oe_kanban_right"> |
889 | - <t t-set="priority" t-value="record.priority.raw_value || 5"/> |
890 | - <a type="object" name="set_priority" args="['3']" t-if="priority gt 3"> |
891 | - <img src="/web/static/src/img/icons/star-off.png" width="16" height="16" title="Good"/> |
892 | - </a> |
893 | - <a type="object" name="set_priority" args="['5']" t-if="priority lte 3"> |
894 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16" title="Good"/> |
895 | - </a> |
896 | - <a type="object" name="set_priority" args="['2']"> |
897 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16" title="Very Good"/> |
898 | - </a> |
899 | - <a type="object" name="set_priority" args="['1']"> |
900 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16" title="Excellent"/> |
901 | - </a> |
902 | - <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"/> |
903 | - |
904 | + <table> |
905 | + <tr> |
906 | + <td groups="base.group_user"> |
907 | + <field name="priority" widget="priority"/> |
908 | + </td> |
909 | + <td> |
910 | + <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"/> |
911 | + </td> |
912 | + </tr> |
913 | + </table> |
914 | </div> |
915 | <div class="oe_kanban_footer_left" style="margin-top:5px;"> |
916 | <t t-raw="record.message_summary.raw_value"/> |
917 | @@ -553,6 +548,52 @@ |
918 | <field name="template_id" domain= "[('model_id.model', '=', 'hr.applicant')]"/> |
919 | </group> |
920 | </group> |
921 | + <separator string="Legend"/> |
922 | + <p>The legend will appear as tooltip of each column of the opportunities pipe.</p> |
923 | + <div> |
924 | + <group col="3"> |
925 | + <div width="57"> |
926 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7</span> |
927 | + </div> |
928 | + <div width="400"> |
929 | + <field name="legend_star1"/> |
930 | + </div> |
931 | + <div></div> |
932 | + </group> |
933 | + </div> |
934 | + <div> |
935 | + <group col="3"> |
936 | + <div width="57"> |
937 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">77</span> |
938 | + </div> |
939 | + <div width="400"> |
940 | + <field name="legend_star2"/> |
941 | + </div> |
942 | + <div></div> |
943 | + </group> |
944 | + </div> |
945 | + <div> |
946 | + <group col="3"> |
947 | + <div width="57"> |
948 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">777</span> |
949 | + </div> |
950 | + <div width="400"> |
951 | + <field name="legend_star3"/> |
952 | + </div> |
953 | + <div></div> |
954 | + </group> |
955 | + </div> |
956 | + <div> |
957 | + <group col="3"> |
958 | + <div width="57"> |
959 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7777</span> |
960 | + </div> |
961 | + <div width="400"> |
962 | + <field name="legend_star4"/> |
963 | + </div> |
964 | + <div></div> |
965 | + </group> |
966 | + </div> |
967 | <separator string="Requirements"/> |
968 | <field name="requirements"/> |
969 | </sheet> |
970 | |
971 | === modified file 'project/project.py' |
972 | --- project/project.py 2014-04-10 14:51:31 +0000 |
973 | +++ project/project.py 2014-05-07 10:11:23 +0000 |
974 | @@ -34,6 +34,29 @@ |
975 | _name = 'project.task.type' |
976 | _description = 'Task Stage' |
977 | _order = 'sequence' |
978 | + |
979 | + def _get_tooltips(self, cr, uid, ids, field, args, context=None): |
980 | + res = {} |
981 | + for rec in self.read(cr, uid, ids, ['legend_blocked', 'legend_done', 'legend_star1','legend_star2','description'],context=context): |
982 | + value = "" |
983 | + star = "<img src='/web/static/src/img/icons/star-on.png'/>" |
984 | + if rec['legend_blocked']: |
985 | + img = "<img src='/web/static/src/img/icons/gtk-no.png'/>" |
986 | + value += img +' '+ rec['legend_blocked'] + "<br/>" |
987 | + if rec['legend_done']: |
988 | + img = "<img src='/web/static/src/img/icons/gtk-yes.png'/> " |
989 | + value += img +' '+ rec['legend_done'] + "<br/>" |
990 | + if rec['legend_star1']: |
991 | + value += star +' '+ rec['legend_star1'] + "<br/>" |
992 | + if rec['legend_star2']: |
993 | + value += star + star +' '+ rec['legend_star2'] + "<br/>" |
994 | + if rec['description']: |
995 | + value += rec['description'] |
996 | + tooltip = {'tooltip': value} |
997 | + tooltip.update(rec) |
998 | + res[rec['id']] = tooltip |
999 | + return res |
1000 | + |
1001 | _columns = { |
1002 | 'name': fields.char('Stage Name', required=True, size=64, translate=True), |
1003 | 'description': fields.text('Description'), |
1004 | @@ -41,6 +64,16 @@ |
1005 | 'case_default': fields.boolean('Default for New Projects', |
1006 | help="If you check this field, this stage will be proposed by default on each new project. It will not assign this stage to existing projects."), |
1007 | 'project_ids': fields.many2many('project.project', 'project_task_type_rel', 'type_id', 'project_id', 'Projects'), |
1008 | + 'kanban_column_tooltip': fields.function(_get_tooltips, string='Tooltips', type="char", help="This tooltips will display on kanban stage header"), |
1009 | + 'legend_blocked': fields.char('Legend Red', help='This tooltip will appear on kanban view column header.'), |
1010 | + 'legend_done':fields.char('Legend Green', help='This tooltip will appear on kanban view column header.'), |
1011 | + 'legend_star1':fields.char('Legend Star', help='This tooltip will appear on kanban view column header.'), |
1012 | + 'legend_star2':fields.char('Legend Star2', help='This tooltip will appear on kanban view column header.'), |
1013 | + 'type': fields.selection([('task', 'Task'), |
1014 | + ('issue', 'Issue'), |
1015 | + ('both', 'Both')], |
1016 | + string='Type', size=16, required=True, |
1017 | + help="This field is used to distinguish stages related to Issues and Tasks, or to specify stages available for both types."), |
1018 | 'fold': fields.boolean('Folded in Kanban View', |
1019 | help='This stage is folded in the kanban view when' |
1020 | 'there are no records in that stage to display.'), |
1021 | @@ -54,6 +87,9 @@ |
1022 | |
1023 | _defaults = { |
1024 | 'sequence': 1, |
1025 | + 'fold': False, |
1026 | + 'case_default': True, |
1027 | + 'type': 'both', |
1028 | 'project_ids': _get_default_project_ids, |
1029 | } |
1030 | _order = 'sequence' |
1031 | @@ -543,9 +579,19 @@ |
1032 | # if alias_model has been changed, update alias_model_id accordingly |
1033 | if vals.get('alias_model'): |
1034 | model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', vals.get('alias_model', 'project.task'))]) |
1035 | - vals.update(alias_model_id=model_ids[0]) |
1036 | + if model_ids and len(model_ids): |
1037 | + vals.update(alias_model_id=model_ids[0]) |
1038 | return super(project, self).write(cr, uid, ids, vals, context=context) |
1039 | |
1040 | + def project_tasks_action(self, cr, uid, ids, context=None): |
1041 | + data_obj = self.pool.get('ir.model.data') |
1042 | + action_obj =self.pool.get('ir.actions.act_window') |
1043 | + |
1044 | + action_id = data_obj.get_object_reference(cr, uid, 'project', 'act_project_project_2_project_task_all')[1] |
1045 | + action = action_obj.read(cr, uid, action_id, [], context) |
1046 | + res = self.read(cr, uid, ids, ['task_label'], context)[0] |
1047 | + action['name'] = res['task_label'] |
1048 | + return action |
1049 | |
1050 | class task(osv.osv): |
1051 | _name = "project.task" |
1052 | @@ -565,6 +611,7 @@ |
1053 | }, |
1054 | 'kanban_state': { |
1055 | 'project.mt_task_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked', |
1056 | + 'project.mt_task_done': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'done', |
1057 | }, |
1058 | } |
1059 | |
1060 | @@ -583,7 +630,7 @@ |
1061 | def _get_default_stage_id(self, cr, uid, context=None): |
1062 | """ Gives default stage_id """ |
1063 | project_id = self._get_default_project_id(cr, uid, context=context) |
1064 | - return self.stage_find(cr, uid, [], project_id, [('fold', '=', False)], context=context) |
1065 | + return self.stage_find(cr, uid, [], project_id, [('sequence', '=', 1),('type', 'in',['task','both'])], context=context) |
1066 | |
1067 | def _resolve_project_id_from_context(self, cr, uid, context=None): |
1068 | """ Returns ID of project based on the value of 'default_project_id' |
1069 | @@ -611,7 +658,9 @@ |
1070 | project_id = self._resolve_project_id_from_context(cr, uid, context=context) |
1071 | if project_id: |
1072 | search_domain += ['|', ('project_ids', '=', project_id)] |
1073 | - search_domain += [('id', 'in', ids)] |
1074 | + search_domain += [('id', 'in', ids),('type', 'in', ['task', 'both'])] |
1075 | + else: |
1076 | + search_domain += [('id', 'in', ids)] |
1077 | stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context) |
1078 | result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context) |
1079 | # restore order of the search |
1080 | @@ -740,18 +789,18 @@ |
1081 | 'active': fields.function(_is_template, store=True, string='Not a Template Task', type='boolean', help="This field is computed automatically and have the same behavior than the boolean 'active' field: if the task is linked to a template or unactivated project, it will be hidden unless specifically asked."), |
1082 | 'name': fields.char('Task Summary', track_visibility='onchange', size=128, required=True, select=True), |
1083 | 'description': fields.text('Description'), |
1084 | - 'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True), |
1085 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority', select=True), |
1086 | 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."), |
1087 | 'stage_id': fields.many2one('project.task.type', 'Stage', track_visibility='onchange', select=True, |
1088 | - domain="[('project_ids', '=', project_id)]"), |
1089 | + domain="[('project_ids', '=', project_id), ('type', 'in', ['task','both'])]"), |
1090 | 'categ_ids': fields.many2many('project.category', string='Tags'), |
1091 | - 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State', |
1092 | + 'kanban_state': fields.selection([('normal', 'In Progress'),('blocked', 'Blocked'),('done', 'Ready')], 'Kanban State', |
1093 | track_visibility='onchange', |
1094 | help="A task's kanban state indicates special situations affecting it:\n" |
1095 | " * Normal is the default situation\n" |
1096 | " * Blocked indicates something is preventing the progress of this task\n" |
1097 | " * Ready for next stage indicates the task is ready to be pulled to the next stage", |
1098 | - readonly=True, required=False), |
1099 | + required=False), |
1100 | 'create_date': fields.datetime('Create Date', readonly=True, select=True), |
1101 | 'write_date': fields.datetime('Last Modification Date', readonly=True, select=True), #not displayed in the view but it might be useful with base_action_rule module (and it needs to be defined first for that) |
1102 | 'date_start': fields.datetime('Starting Date',select=True), |
1103 | @@ -799,7 +848,7 @@ |
1104 | 'project_id': _get_default_project_id, |
1105 | 'date_last_stage_update': fields.datetime.now, |
1106 | 'kanban_state': 'normal', |
1107 | - 'priority': '2', |
1108 | + 'priority': '1', |
1109 | 'progress': 0, |
1110 | 'sequence': 10, |
1111 | 'active': True, |
1112 | @@ -808,17 +857,7 @@ |
1113 | 'partner_id': lambda self, cr, uid, ctx=None: self._get_default_partner(cr, uid, context=ctx), |
1114 | } |
1115 | _order = "priority, sequence, date_start, name, id" |
1116 | - |
1117 | - def set_high_priority(self, cr, uid, ids, *args): |
1118 | - """Set task priority to high |
1119 | - """ |
1120 | - return self.write(cr, uid, ids, {'priority' : '0'}) |
1121 | - |
1122 | - def set_normal_priority(self, cr, uid, ids, *args): |
1123 | - """Set task priority to normal |
1124 | - """ |
1125 | - return self.write(cr, uid, ids, {'priority' : '2'}) |
1126 | - |
1127 | + |
1128 | def _check_recursion(self, cr, uid, ids, context=None): |
1129 | for id in ids: |
1130 | visited_branch = set() |
1131 | @@ -1003,16 +1042,6 @@ |
1132 | def set_remaining_time_10(self, cr, uid, ids, context=None): |
1133 | return self.set_remaining_time(cr, uid, ids, 10.0, context) |
1134 | |
1135 | - def set_kanban_state_blocked(self, cr, uid, ids, context=None): |
1136 | - return self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context) |
1137 | - |
1138 | - def set_kanban_state_normal(self, cr, uid, ids, context=None): |
1139 | - return self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context) |
1140 | - |
1141 | - def set_kanban_state_done(self, cr, uid, ids, context=None): |
1142 | - self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context) |
1143 | - return False |
1144 | - |
1145 | def _store_history(self, cr, uid, ids, context=None): |
1146 | for task in self.browse(cr, uid, ids, context=context): |
1147 | self.pool.get('project.task.history').create(cr, uid, { |
1148 | @@ -1193,7 +1222,11 @@ |
1149 | _columns = { |
1150 | '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"), |
1151 | 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), |
1152 | + 'task_label': fields.char('Use Task as', size=128, help="Gives label to tasks on project's kanaban view.", required=True) |
1153 | } |
1154 | + _defaults = { |
1155 | + 'task_label': 'Tasks' |
1156 | + } |
1157 | |
1158 | def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None): |
1159 | res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, date_start=date_start, context=context) |
1160 | |
1161 | === modified file 'project/project_data.xml' |
1162 | --- project/project_data.xml 2014-02-21 11:27:04 +0000 |
1163 | +++ project/project_data.xml 2014-05-07 10:11:23 +0000 |
1164 | @@ -31,32 +31,56 @@ |
1165 | <field name="sequence">1</field> |
1166 | <field name="name">Analysis</field> |
1167 | <field name="case_default" eval="True"/> |
1168 | + <field name="legend_blocked">There is a problem in analysis.</field> |
1169 | + <field name="legend_done">Ready for the next stage.</field> |
1170 | + <field name="legend_star1">High priority for the analysis.</field> |
1171 | + <field name="legend_star2">Highest priority for the analysis.</field> |
1172 | </record> |
1173 | <record id="project_tt_specification" model="project.task.type"> |
1174 | <field name="sequence">10</field> |
1175 | <field name="name">Specification</field> |
1176 | <field name="case_default" eval="True"/> |
1177 | + <field name="legend_blocked">Need more info about customer’s needs.</field> |
1178 | + <field name="legend_done">Ready for the next stage.</field> |
1179 | + <field name="legend_star1">High priority for the specification.</field> |
1180 | + <field name="legend_star2">Highest priority for the specification.</field> |
1181 | </record> |
1182 | <record id="project_tt_design" model="project.task.type"> |
1183 | <field name="sequence">11</field> |
1184 | <field name="name">Design</field> |
1185 | <field name="case_default" eval="True"/> |
1186 | + <field name="legend_blocked">Design is not valid.</field> |
1187 | + <field name="legend_done">Ready for the next stage.</field> |
1188 | + <field name="legend_star1">High priority for the design.</field> |
1189 | + <field name="legend_star2">Highest priority for the design.</field> |
1190 | </record> |
1191 | <record id="project_tt_development" model="project.task.type"> |
1192 | <field name="sequence">12</field> |
1193 | <field name="name">Development</field> |
1194 | <field name="case_default" eval="True"/> |
1195 | + <field name="legend_blocked">Need help from the specification team.</field> |
1196 | + <field name="legend_done">Ready for the next stage.</field> |
1197 | + <field name="legend_star1">High priority for the development.</field> |
1198 | + <field name="legend_star2">Highest priority for the development.</field> |
1199 | </record> |
1200 | <record id="project_tt_testing" model="project.task.type"> |
1201 | <field name="sequence">13</field> |
1202 | <field name="name">Testing</field> |
1203 | <field name="case_default" eval="True"/> |
1204 | + <field name="legend_blocked">Test is failed.</field> |
1205 | + <field name="legend_done">Test result is achieved.</field> |
1206 | + <field name="legend_star1">High priority for the testing.</field> |
1207 | + <field name="legend_star2">Highest priority for the testing.</field> |
1208 | </record> |
1209 | <record id="project_tt_merge" model="project.task.type"> |
1210 | <field name="sequence">14</field> |
1211 | <field name="name">Merge</field> |
1212 | <field name="case_default" eval="False"/> |
1213 | <field name="fold" eval="True"/> |
1214 | + <field name="legend_blocked">TConflict in any file.</field> |
1215 | + <field name="legend_done">Ready for the next stage.</field> |
1216 | + <field name="legend_star1">High priority for the merging.</field> |
1217 | + <field name="legend_star2">Highest priority for the merging.</field> |
1218 | </record> |
1219 | <record id="project_tt_deployment" model="project.task.type"> |
1220 | <field name="sequence">20</field> |
1221 | @@ -69,6 +93,9 @@ |
1222 | <field name="name">Cancelled</field> |
1223 | <field name="case_default" eval="True"/> |
1224 | <field name="fold" eval="True"/> |
1225 | + <field name="legend_done">Ready to reopen.</field> |
1226 | + <field name="legend_star1">High priority for the reopen.</field> |
1227 | + <field name="legend_star2">Highest priority for the reopen.</field> |
1228 | </record> |
1229 | </data> |
1230 | |
1231 | @@ -93,6 +120,12 @@ |
1232 | <field name="default" eval="False"/> |
1233 | <field name="description">Task blocked</field> |
1234 | </record> |
1235 | + <record id="mt_project_task_done" model="mail.message.subtype"> |
1236 | + <field name="name">Task Done</field> |
1237 | + <field name="res_model">project.task</field> |
1238 | + <field name="default" eval="False"/> |
1239 | + <field name="description">Task Done</field> |
1240 | + </record> |
1241 | <record id="mt_task_stage" model="mail.message.subtype"> |
1242 | <field name="name">Stage Changed</field> |
1243 | <field name="res_model">project.task</field> |
1244 | |
1245 | === modified file 'project/project_demo.xml' |
1246 | --- project/project_demo.xml 2013-11-27 15:32:57 +0000 |
1247 | +++ project/project_demo.xml 2014-05-07 10:11:23 +0000 |
1248 | @@ -67,6 +67,7 @@ |
1249 | <field name="alias_model">project.task</field> |
1250 | <field name="privacy_visibility">employees</field> |
1251 | <field name="members" eval="[(4, ref('base.user_root')), (4, ref('base.user_demo'))]"/> |
1252 | + <field name="task_label">Trainings</field> |
1253 | </record> |
1254 | |
1255 | <record id="project_project_3" model="project.project"> |
1256 | @@ -82,6 +83,7 @@ |
1257 | <field name="alias_model">project.task</field> |
1258 | <field name="privacy_visibility">employees</field> |
1259 | <field name="members" eval="[(4, ref('base.user_root')), (4,ref('base.user_demo'))]"/> |
1260 | + <field name="task_label">Designs</field> |
1261 | </record> |
1262 | |
1263 | <record id="project_project_4" model="project.project"> |
1264 | @@ -98,6 +100,7 @@ |
1265 | <field name="members" eval="[(6, 0, [ |
1266 | ref('base.user_root'), |
1267 | ref('base.user_demo')])]"/> |
1268 | + <field name="task_label">Databases</field> |
1269 | </record> |
1270 | |
1271 | <record id="project_project_5" model="project.project"> |
1272 | @@ -110,7 +113,7 @@ |
1273 | <field name="planned_hours" eval="40.0"/> |
1274 | <field name="remaining_hours" eval="40.0"/> |
1275 | <field name="user_id" ref="base.user_demo"/> |
1276 | - <field name="priority">4</field> |
1277 | + <field name="priority">0</field> |
1278 | <field name="project_id" ref="project.project_project_1"/> |
1279 | <field name="name">Prepare Requirements Document</field> |
1280 | <field name="stage_id" ref="project_tt_analysis"/> |
1281 | @@ -120,7 +123,7 @@ |
1282 | <field name="planned_hours" eval="32.0"/> |
1283 | <field name="remaining_hours" eval="32.0"/> |
1284 | <field name="user_id" ref="base.user_demo"/> |
1285 | - <field name="priority">4</field> |
1286 | + <field name="priority">0</field> |
1287 | <field name="project_id" ref="project.project_project_1"/> |
1288 | <field name="name">Make SRS</field> |
1289 | <field name="stage_id" ref="project_tt_specification"/> |
1290 | @@ -129,7 +132,7 @@ |
1291 | <field name="planned_hours" eval="10.0"/> |
1292 | <field name="remaining_hours" eval="10.0"/> |
1293 | <field name="user_id" ref="base.user_root"/> |
1294 | - <field name="priority">4</field> |
1295 | + <field name="priority">0</field> |
1296 | <field name="project_id" ref="project.project_project_1"/> |
1297 | <field name="name">Budget Planning</field> |
1298 | <field name="date_deadline" eval="time.strftime('%Y-%m-24')"/> |
1299 | @@ -140,7 +143,7 @@ |
1300 | <field name="planned_hours" eval="60.0"/> |
1301 | <field name="remaining_hours" eval="60.0"/> |
1302 | <field name="user_id" ref="base.user_demo"/> |
1303 | - <field name="priority">4</field> |
1304 | + <field name="priority">0</field> |
1305 | <field name="project_id" ref="project.project_project_1"/> |
1306 | <field name="name">Develop module for Sale Management</field> |
1307 | <field name="description">Use the account_budget module</field> |
1308 | |
1309 | === modified file 'project/project_view.xml' |
1310 | --- project/project_view.xml 2014-04-15 12:14:04 +0000 |
1311 | +++ project/project_view.xml 2014-05-07 10:11:23 +0000 |
1312 | @@ -87,14 +87,14 @@ |
1313 | <h1> |
1314 | <field name="name" string="Project Name"/> |
1315 | </h1> |
1316 | - <div name="options_active"> |
1317 | - <field name="use_tasks" class="oe_inline"/> |
1318 | - <label for="use_tasks"/> |
1319 | + <div name="options_active" class="oe_inline oe_left"> |
1320 | + <field name="use_tasks" class="oe_from_boolean_align"/> |
1321 | + <label for="task_label" class="oe_edit_only"/> |
1322 | + <b><field name="task_label" class="oe_inline"/></b> |
1323 | </div> |
1324 | </div> |
1325 | <div class="oe_right oe_button_box" name="buttons" groups="base.group_user"> |
1326 | - <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_tasks','=', 0)]}" |
1327 | - name="%(act_project_project_2_project_task_all)d" icon="fa-tasks"> |
1328 | + <button class="oe_inline oe_stat_button" type="object" attrs="{'invisible':[('use_tasks','=', 0)]}" name="project_tasks_action" icon="fa-tasks"> |
1329 | <field string="Tasks" name="task_count" widget="statinfo"/> |
1330 | </button> |
1331 | <button class="oe_inline oe_stat_button" name="attachment_tree_view" type="object" icon="fa-files-o"> |
1332 | @@ -125,9 +125,8 @@ |
1333 | </div> |
1334 | <label for="alias_model" string="Incoming Emails create"/> |
1335 | <field name="alias_model" class="oe_inline" nolabel="1"/> |
1336 | - <field name="alias_contact" class="oe_inline" |
1337 | - string="Accept Emails From"/> |
1338 | - </group> |
1339 | + <field name="alias_contact" class="oe_inline" string="Accept Emails From"/> |
1340 | + </group> |
1341 | </group> |
1342 | <notebook> |
1343 | <page string="Team" name="team"> |
1344 | @@ -170,7 +169,13 @@ |
1345 | </group> |
1346 | </page> |
1347 | <page string="Project Stages" attrs="{'invisible': [('use_tasks', '=', False)]}" name="project_stages"> |
1348 | - <field name="type_ids"/> |
1349 | + <field name="type_ids"> |
1350 | + <tree> |
1351 | + <field name="sequence" widget="handle"/> |
1352 | + <field name="name"/> |
1353 | + <field name="kanban_column_tooltip" widget="tooltiphtml"/> |
1354 | + </tree> |
1355 | + </field> |
1356 | </page> |
1357 | </notebook> |
1358 | </sheet> |
1359 | @@ -264,9 +269,9 @@ |
1360 | <span class="oe_e oe_e_alias">%%</span><small><field name="alias_id"/></small> |
1361 | </div> |
1362 | <div class="oe_kanban_project_list"> |
1363 | - <a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px"> |
1364 | - <t t-raw="record.task_ids.raw_value.length"/> Tasks |
1365 | - </a> |
1366 | + <a t-if="record.use_tasks.raw_value" name="project_tasks_action" type="object" style="margin-right: 10px"> |
1367 | + <span><field name="task_count"/> <field name="task_label"/></span> |
1368 | + </a> |
1369 | </div> |
1370 | <div class="oe_kanban_project_list"> |
1371 | <a t-if="record.doc_count.raw_value" name="attachment_tree_view" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a> |
1372 | @@ -379,11 +384,10 @@ |
1373 | <sheet string="Task"> |
1374 | <h1> |
1375 | <field name="name" placeholder="Task summary..." class="oe_inline"/> |
1376 | - <field name="kanban_state" invisible='1'/> |
1377 | - <button name="set_kanban_state_done" help="In Progress" attrs="{'invisible': [('kanban_state', 'in', ['done','blocked'])]}" type="object" icon="gtk-normal" class="oe_link oe_right"/> |
1378 | - <button name="set_kanban_state_blocked" help="Ready for Next Stage" attrs="{'invisible': [('kanban_state', 'in', ['normal','blocked'])]}" type="object" icon="gtk-yes" class="oe_link oe_right"/> |
1379 | - <button name="set_kanban_state_normal" help="Blocked" attrs="{'invisible': [('kanban_state', 'in', ['done','normal'])]}" type="object" icon="gtk-no" class="oe_link oe_right"/> |
1380 | </h1> |
1381 | + <div class="oe_right"> |
1382 | + <field name="kanban_state" class="oe_inline" widget="dropdown_selection"/> |
1383 | + </div> |
1384 | <group> |
1385 | <group> |
1386 | <field name="project_id" domain="[('state', '!=', 'close')]" on_change="onchange_project(project_id)" context="{'default_use_tasks':1}"/> |
1387 | @@ -444,7 +448,7 @@ |
1388 | </page> |
1389 | <page string="Extra Info"> |
1390 | <group col="4"> |
1391 | - <field name="priority" groups="base.group_user"/> |
1392 | + <field name="priority" groups="base.group_user" widget="priority"/> |
1393 | <field name="sequence"/> |
1394 | <field name="partner_id"/> |
1395 | <field name="company_id" groups="base.group_multi_company" widget="selection"/> |
1396 | @@ -477,7 +481,7 @@ |
1397 | <kanban default_group_by="stage_id" > |
1398 | <field name="color"/> |
1399 | <field name="priority"/> |
1400 | - <field name="stage_id"/> |
1401 | + <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/> |
1402 | <field name="user_id"/> |
1403 | <field name="user_email"/> |
1404 | <field name="description"/> |
1405 | @@ -515,16 +519,6 @@ |
1406 | <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t> |
1407 | <span t-attf-class="#{red || ''}"><i><field name="date_deadline"/></i></span> |
1408 | </div> |
1409 | - <div class="oe_kanban_bottom_right"> |
1410 | - <t groups="base.group_user"> |
1411 | - <a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a> |
1412 | - <a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready for next stage" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a> |
1413 | - <a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a> |
1414 | - <a t-if="record.priority.raw_value > 0" type="object" string="Normal" name="set_high_priority" class="oe_e oe_star_off">7</a> |
1415 | - <a t-if="record.priority.raw_value == 0" type="object" string="Very Important" name="set_normal_priority" class="oe_e oe_star_on">7</a> |
1416 | - </t> |
1417 | - <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"/> |
1418 | - </div> |
1419 | <div class="oe_kanban_footer_left"> |
1420 | <span groups="project.group_time_work_estimation_tasks" title="Remaining hours"> |
1421 | <span class="oe_e">N</span> |
1422 | @@ -535,6 +529,21 @@ |
1423 | <t t-raw="record.message_summary.raw_value"/> |
1424 | <field name="categ_ids"/> |
1425 | </div> |
1426 | + <div class="oe_kanban_bottom_right"> |
1427 | + <table> |
1428 | + <tr> |
1429 | + <td groups="base.group_user"> |
1430 | + <field name="kanban_state" widget="dropdown_selection"/> |
1431 | + </td> |
1432 | + <td groups="base.group_user"> |
1433 | + <field name="priority" widget="priority"/> |
1434 | + </td> |
1435 | + <td> |
1436 | + <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"/> |
1437 | + </td> |
1438 | + </tr> |
1439 | + </table> |
1440 | + </div> |
1441 | </div> |
1442 | <div class="oe_clear"></div> |
1443 | </div> |
1444 | @@ -609,8 +618,11 @@ |
1445 | <field eval="18" name="priority"/> |
1446 | <field name="arch" type="xml"> |
1447 | <xpath expr='//div[@name="project"]' position='inside'> |
1448 | - <field name="use_tasks"/> |
1449 | - <label for="use_tasks"/> |
1450 | + <div name="options_active" class="oe_inline oe_left"> |
1451 | + <field name="use_tasks" class="oe_from_boolean_align"/> |
1452 | + <label for="task_label" class="oe_edit_only"/> |
1453 | + <b><field name="task_label" class="oe_inline"/></b> |
1454 | + </div> |
1455 | </xpath> |
1456 | </field> |
1457 | </record> |
1458 | @@ -688,6 +700,7 @@ |
1459 | <group> |
1460 | <group> |
1461 | <field name="name"/> |
1462 | + <field name="type" invisible="1"/> |
1463 | <field name="sequence"/> |
1464 | </group> |
1465 | <group> |
1466 | @@ -695,6 +708,53 @@ |
1467 | <field name="fold"/> |
1468 | </group> |
1469 | </group> |
1470 | + <separator string="Legends"/> |
1471 | + <p>The legend will appear as tooltip of each column of the tasks/issues pipe.</p> |
1472 | + <div> |
1473 | + <group col="3"> |
1474 | + <div width="35"> |
1475 | + <span class='status error' title="This tooltip will appear on kanban view column header."/> |
1476 | + </div> |
1477 | + <div width="400"> |
1478 | + <field name="legend_blocked" title="This tooltip will appear on kanban view column header."/> |
1479 | + </div> |
1480 | + <div></div> |
1481 | + </group> |
1482 | + </div> |
1483 | + <div> |
1484 | + <group col="3"> |
1485 | + <div width="35"> |
1486 | + <span class='status ok'/> |
1487 | + </div> |
1488 | + <div width="400"> |
1489 | + <field name="legend_done"/> |
1490 | + </div> |
1491 | + <div></div> |
1492 | + </group> |
1493 | + </div> |
1494 | + <div> |
1495 | + <group col="3"> |
1496 | + <div width="35"> |
1497 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7</span> |
1498 | + </div> |
1499 | + <div width="400"> |
1500 | + <field name="legend_star1"/> |
1501 | + </div> |
1502 | + <div></div> |
1503 | + </group> |
1504 | + </div> |
1505 | + <div attrs="{'invisible':[('type','=', 'task')]}"> |
1506 | + <group col="3"> |
1507 | + <div width="35"> |
1508 | + <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">77</span> |
1509 | + </div> |
1510 | + <div width="400"> |
1511 | + <field name="legend_star2"/> |
1512 | + </div> |
1513 | + <div></div> |
1514 | + </group> |
1515 | + </div> |
1516 | + <separator string="Description"/> |
1517 | <field name="description" placeholder="Add a description..."/> |
1518 | </form> |
1519 | </field> |
1520 | @@ -733,7 +793,7 @@ |
1521 | |
1522 | <menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1" groups="base.group_no_one"/> |
1523 | |
1524 | - <menuitem action="open_task_type_form" name="Task Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/> |
1525 | + <menuitem action="open_task_type_form" name="Project Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/> |
1526 | <menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_project_management" sequence="1"/> |
1527 | |
1528 | |
1529 | |
1530 | === modified file 'project/report/project_report.py' |
1531 | --- project/report/project_report.py 2014-01-29 15:24:40 +0000 |
1532 | +++ project/report/project_report.py 2014-05-07 10:11:23 +0000 |
1533 | @@ -48,7 +48,7 @@ |
1534 | help="Number of Days to Open the task"), |
1535 | 'delay_endings_days': fields.float('Overpassed Deadline', digits=(16,2), readonly=True), |
1536 | 'nbr': fields.integer('# of tasks', readonly=True), |
1537 | - 'priority': fields.selection([('4', 'Very Low'), ('3', 'Low'), ('2', 'Medium'), ('1', 'Urgent'), ('0', 'Very urgent')], |
1538 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], |
1539 | string='Priority', readonly=True), |
1540 | 'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')],'Status', readonly=True), |
1541 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), |
1542 | |
1543 | === modified file 'project/static/src/css/project.css' |
1544 | --- project/static/src/css/project.css 2013-10-27 12:31:04 +0000 |
1545 | +++ project/static/src/css/project.css 2014-05-07 10:11:23 +0000 |
1546 | @@ -62,4 +62,8 @@ |
1547 | -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); |
1548 | } |
1549 | |
1550 | +.openerp .oe_form .oe_from_boolean_align{ |
1551 | + vertical-align: middle; |
1552 | + margin-top: 2px; |
1553 | +} |
1554 | |
1555 | |
1556 | === modified file 'project/static/src/js/project.js' |
1557 | --- project/static/src/js/project.js 2014-04-17 09:05:15 +0000 |
1558 | +++ project/static/src/js/project.js 2014-05-07 10:11:23 +0000 |
1559 | @@ -42,4 +42,14 @@ |
1560 | } |
1561 | }, |
1562 | }); |
1563 | + |
1564 | + openerp.web.list.TooltipHtml = openerp.web.list.Column.extend({ |
1565 | + format: function (row_data, options) { |
1566 | + if (row_data.kanban_column_tooltip !== undefined){ |
1567 | + return row_data.kanban_column_tooltip.value.tooltip |
1568 | + } |
1569 | + } |
1570 | + }); |
1571 | + |
1572 | + openerp.web.list.columns.add('field.tooltiphtml', 'openerp.web.list.TooltipHtml'); |
1573 | }; |
1574 | |
1575 | === modified file 'project_issue/project_issue.py' |
1576 | --- project_issue/project_issue.py 2014-04-10 14:51:31 +0000 |
1577 | +++ project_issue/project_issue.py 2014-05-07 10:11:23 +0000 |
1578 | @@ -57,6 +57,7 @@ |
1579 | }, |
1580 | 'kanban_state': { |
1581 | 'project_issue.mt_issue_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked', |
1582 | + 'project_issue.mt_issue_done': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'done', |
1583 | }, |
1584 | } |
1585 | |
1586 | @@ -75,7 +76,7 @@ |
1587 | def _get_default_stage_id(self, cr, uid, context=None): |
1588 | """ Gives default stage_id """ |
1589 | project_id = self._get_default_project_id(cr, uid, context=context) |
1590 | - return self.stage_find(cr, uid, [], project_id, [('fold', '=', False)], context=context) |
1591 | + return self.stage_find(cr, uid, [], project_id, [('sequence','=',1),('type','in',['issue','both'])], context=context) |
1592 | |
1593 | def _resolve_project_id_from_context(self, cr, uid, context=None): |
1594 | """ Returns ID of project based on the value of 'default_project_id' |
1595 | @@ -108,7 +109,9 @@ |
1596 | project_id = self._resolve_project_id_from_context(cr, uid, context=context) |
1597 | if project_id: |
1598 | search_domain += ['|', ('project_ids', '=', project_id)] |
1599 | - search_domain += [('id', 'in', ids)] |
1600 | + search_domain += [('id', 'in', ids),('type', 'in', ['issue','both'])] |
1601 | + else: |
1602 | + search_domain += [('id', 'in', ids)] |
1603 | # perform search |
1604 | stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context) |
1605 | result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context) |
1606 | @@ -250,7 +253,7 @@ |
1607 | " * Normal is the default situation\n" |
1608 | " * Blocked indicates something is preventing the progress of this issue\n" |
1609 | " * Ready for next stage indicates the issue is ready to be pulled to the next stage", |
1610 | - readonly=True, required=False), |
1611 | + required=False), |
1612 | 'email_from': fields.char('Email', size=128, help="These people will receive email.", select=1), |
1613 | 'email_cc': fields.char('Watchers Emails', size=256, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"), |
1614 | 'date_open': fields.datetime('Opened', readonly=True,select=True), |
1615 | @@ -260,11 +263,11 @@ |
1616 | 'date_last_stage_update': fields.datetime('Last Stage Update', select=True), |
1617 | 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."), |
1618 | 'categ_ids': fields.many2many('project.category', string='Tags'), |
1619 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True), |
1620 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority', select=True), |
1621 | 'version_id': fields.many2one('project.issue.version', 'Version'), |
1622 | 'stage_id': fields.many2one ('project.task.type', 'Stage', |
1623 | track_visibility='onchange', select=True, |
1624 | - domain="[('project_ids', '=', project_id)]"), |
1625 | + domain="[('project_ids', '=', project_id),('type','in',['issue','both'])]"), |
1626 | 'project_id': fields.many2one('project.project', 'Project', track_visibility='onchange', select=True), |
1627 | 'duration': fields.float('Duration'), |
1628 | 'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"), |
1629 | @@ -295,7 +298,7 @@ |
1630 | 'active': 1, |
1631 | 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c), |
1632 | 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c), |
1633 | - 'priority': crm.AVAILABLE_PRIORITIES[2][0], |
1634 | + 'priority': '1', |
1635 | 'kanban_state': 'normal', |
1636 | 'date_last_stage_update': fields.datetime.now, |
1637 | 'user_id': lambda obj, cr, uid, context: uid, |
1638 | @@ -306,17 +309,9 @@ |
1639 | } |
1640 | |
1641 | def set_priority(self, cr, uid, ids, priority, *args): |
1642 | - return self.write(cr, uid, ids, {'priority' : priority}) |
1643 | - |
1644 | - def set_high_priority(self, cr, uid, ids, *args): |
1645 | - """Set lead priority to high |
1646 | - """ |
1647 | - return self.set_priority(cr, uid, ids, '1') |
1648 | - |
1649 | - def set_normal_priority(self, cr, uid, ids, *args): |
1650 | - """Set lead priority to normal |
1651 | - """ |
1652 | - return self.set_priority(cr, uid, ids, '3') |
1653 | + """Set lead priority |
1654 | + """ |
1655 | + return self.write(cr, uid, ids, {'priority' : str(priority)}) |
1656 | |
1657 | def copy(self, cr, uid, id, default=None, context=None): |
1658 | issue = self.read(cr, uid, id, ['name'], context=context) |
1659 | @@ -375,15 +370,6 @@ |
1660 | # Stage management |
1661 | # ------------------------------------------------------- |
1662 | |
1663 | - def set_kanban_state_blocked(self, cr, uid, ids, context=None): |
1664 | - return self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context) |
1665 | - |
1666 | - def set_kanban_state_normal(self, cr, uid, ids, context=None): |
1667 | - return self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context) |
1668 | - |
1669 | - def set_kanban_state_done(self, cr, uid, ids, context=None): |
1670 | - return self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context) |
1671 | - |
1672 | def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None): |
1673 | """ Override of the base.stage method |
1674 | Parameter of the stage search taken from the issue: |
1675 | @@ -403,7 +389,7 @@ |
1676 | # OR all section_ids and OR with case_default |
1677 | search_domain = [] |
1678 | if section_ids: |
1679 | - search_domain += [('|')] * (len(section_ids)-1) |
1680 | + search_domain = [('|')] * (len(section_ids)-1) |
1681 | for section_id in section_ids: |
1682 | search_domain.append(('project_ids', '=', section_id)) |
1683 | search_domain += list(domain) |
1684 | @@ -514,6 +500,15 @@ |
1685 | (_check_escalation, 'Error! You cannot assign escalation to the same project!', ['project_escalation_id']) |
1686 | ] |
1687 | |
1688 | + def project_issues_action(self, cr, uid, ids, context=None): |
1689 | + data_obj = self.pool.get('ir.model.data') |
1690 | + action_obj =self.pool.get('ir.actions.act_window') |
1691 | + |
1692 | + action_id = data_obj.get_object_reference(cr, uid, 'project_issue', 'act_project_project_2_project_issue_all')[1] |
1693 | + action = action_obj.read(cr, uid, action_id, [], context) |
1694 | + res = self.read(cr, uid, ids, ['issue_label'], context)[0] |
1695 | + action['name'] = res['issue_label'] |
1696 | + return action |
1697 | |
1698 | class account_analytic_account(osv.Model): |
1699 | _inherit = 'account.analytic.account' |
1700 | @@ -521,6 +516,10 @@ |
1701 | |
1702 | _columns = { |
1703 | 'use_issues': fields.boolean('Issues', help="Check this field if this project manages issues"), |
1704 | + 'issue_label': fields.char('Use Issues as', size=128, help="Gives label to issues on project's kanaban view.", required=True), |
1705 | + } |
1706 | + _defaults = { |
1707 | + 'issue_label': 'Issues', |
1708 | } |
1709 | |
1710 | def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None): |
1711 | |
1712 | === modified file 'project_issue/project_issue_data.xml' |
1713 | --- project_issue/project_issue_data.xml 2014-02-21 11:27:04 +0000 |
1714 | +++ project_issue/project_issue_data.xml 2014-05-07 10:11:23 +0000 |
1715 | @@ -48,6 +48,12 @@ |
1716 | <field name="default" eval="False"/> |
1717 | <field name="description">Issue blocked</field> |
1718 | </record> |
1719 | + <record id="mt_issue_done" model="mail.message.subtype"> |
1720 | + <field name="name">Issue Done</field> |
1721 | + <field name="res_model">project.issue</field> |
1722 | + <field name="default" eval="False"/> |
1723 | + <field name="description">Issue Done</field> |
1724 | + </record> |
1725 | <record id="mt_issue_stage" model="mail.message.subtype"> |
1726 | <field name="name">Stage Changed</field> |
1727 | <field name="res_model">project.issue</field> |
1728 | |
1729 | === modified file 'project_issue/project_issue_demo.xml' |
1730 | --- project_issue/project_issue_demo.xml 2012-11-29 22:26:45 +0000 |
1731 | +++ project_issue/project_issue_demo.xml 2014-05-07 10:11:23 +0000 |
1732 | @@ -6,12 +6,15 @@ |
1733 | <field name="use_issues" eval="True"/> |
1734 | </record> |
1735 | <record id="project.project_project_2" model="project.project"> |
1736 | + <field name="issue_label">Bugs</field> |
1737 | <field name="use_issues" eval="True"/> |
1738 | </record> |
1739 | <record id="project.project_project_3" model="project.project"> |
1740 | + <field name="issue_label">Feedbacks</field> |
1741 | <field name="use_issues" eval="True"/> |
1742 | </record> |
1743 | <record id="project.project_project_4" model="project.project"> |
1744 | + <field name="issue_label">Bugs</field> |
1745 | <field name="use_issues" eval="True"/> |
1746 | </record> |
1747 | <record id="project.project_project_5" model="project.project"> |
1748 | @@ -35,7 +38,7 @@ |
1749 | <!-- Issues --> |
1750 | <record id="crm_case_buginaccountsmodule0" model="project.issue"> |
1751 | <field eval="time.strftime('%Y-%m-08 10:15:00')" name="date"/> |
1752 | - <field name="priority">5</field> |
1753 | + <field name="priority">0</field> |
1754 | <field name="user_id" ref="base.user_root"/> |
1755 | <field name="partner_id" ref="base.res_partner_2"/> |
1756 | <field name="section_id" ref="crm.section_sales_department"/> |
1757 | @@ -51,7 +54,7 @@ |
1758 | |
1759 | <record id="crm_case_programnotgivingproperoutput0" model="project.issue"> |
1760 | <field eval="time.strftime('%Y-%m-15 12:50:00')" name="date"/> |
1761 | - <field name="priority">3</field> |
1762 | + <field name="priority">1</field> |
1763 | <field name="user_id" ref="base.user_root"/> |
1764 | <field name="partner_id" ref="base.res_partner_1"/> |
1765 | <field name="section_id" ref="crm.section_sales_department"/> |
1766 | @@ -64,7 +67,7 @@ |
1767 | |
1768 | <record id="crm_case_outputincorrect0" model="project.issue"> |
1769 | <field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/> |
1770 | - <field name="priority">4</field> |
1771 | + <field name="priority">0</field> |
1772 | <field name="user_id" ref="base.user_demo"/> |
1773 | <field name="section_id" ref="crm.section_sales_department"/> |
1774 | <field eval="1" name="active"/> |
1775 | @@ -79,7 +82,7 @@ |
1776 | |
1777 | <record id="crm_case_problemloadingpage0" model="project.issue"> |
1778 | <field eval="time.strftime('%Y-%m-20 15:25:05')" name="date"/> |
1779 | - <field name="priority">3</field> |
1780 | + <field name="priority">1</field> |
1781 | <field name="user_id" ref="base.user_root"/> |
1782 | <field name="partner_id" ref="base.res_partner_14"/> |
1783 | <field name="section_id" ref="crm.section_sales_department"/> |
1784 | @@ -92,7 +95,7 @@ |
1785 | |
1786 | <record id="crm_case_pagenotfound0" model="project.issue"> |
1787 | <field eval="time.strftime('%Y-%m-22 18:15:00')" name="date"/> |
1788 | - <field name="priority">3</field> |
1789 | + <field name="priority">1</field> |
1790 | <field name="user_id" ref="base.user_root"/> |
1791 | <field name="partner_id" ref="base.res_partner_13"/> |
1792 | <field name="section_id" ref="crm.section_sales_department"/> |
1793 | @@ -105,7 +108,7 @@ |
1794 | |
1795 | <record id="crm_case_programmingerror0" model="project.issue"> |
1796 | <field eval="time.strftime('%Y-%m-24 09:45:00')" name="date"/> |
1797 | - <field name="priority">3</field> |
1798 | + <field name="priority">1</field> |
1799 | <field name="user_id" ref="base.user_root"/> |
1800 | <field name="partner_id" ref="base.res_partner_5"/> |
1801 | <field name="section_id" ref="crm.section_sales_department"/> |
1802 | @@ -172,7 +175,7 @@ |
1803 | |
1804 | <record id="crm_case_newfeaturestobeadded0" model="project.issue"> |
1805 | <field eval="time.strftime('%Y-%m-01 12:15:10')" name="date"/> |
1806 | - <field name="priority">4</field> |
1807 | + <field name="priority">0</field> |
1808 | <field name="user_id" ref="base.user_root"/> |
1809 | <field name="partner_id" ref="base.res_partner_8"/> |
1810 | <field name="section_id" ref="crm.section_sales_department"/> |
1811 | @@ -199,7 +202,7 @@ |
1812 | |
1813 | <record id="crm_case_includeattendancesheetinproject0" model="project.issue"> |
1814 | <field eval="time.strftime('%Y-%m-10 17:05:30')" name="date"/> |
1815 | - <field name="priority">3</field> |
1816 | + <field name="priority">1</field> |
1817 | <field name="user_id" ref="base.user_root"/> |
1818 | <field name="partner_id" ref="base.res_partner_10"/> |
1819 | <field name="section_id" ref="crm.section_sales_department"/> |
1820 | @@ -213,7 +216,7 @@ |
1821 | |
1822 | <record id="crm_case_createnewobject0" model="project.issue"> |
1823 | <field eval="time.strftime('%Y-%m-15 10:35:15')" name="date"/> |
1824 | - <field name="priority">3</field> |
1825 | + <field name="priority">1</field> |
1826 | <field name="user_id" ref="base.user_root"/> |
1827 | <field name="partner_id" ref="base.res_partner_6"/> |
1828 | <field name="section_id" ref="crm.section_sales_department"/> |
1829 | @@ -226,7 +229,7 @@ |
1830 | |
1831 | <record id="crm_case_improvereportsinhrms0" model="project.issue"> |
1832 | <field eval="time.strftime('%Y-%m-19 12:15:00')" name="date"/> |
1833 | - <field name="priority">4</field> |
1834 | + <field name="priority">0</field> |
1835 | <field name="user_id" ref="base.user_root"/> |
1836 | <field name="partner_id" ref="base.res_partner_11"/> |
1837 | <field name="section_id" ref="crm.section_sales_department"/> |
1838 | |
1839 | === modified file 'project_issue/project_issue_view.xml' |
1840 | --- project_issue/project_issue_view.xml 2014-05-02 13:07:53 +0000 |
1841 | +++ project_issue/project_issue_view.xml 2014-05-07 10:11:23 +0000 |
1842 | @@ -55,11 +55,10 @@ |
1843 | <label for="name" class="oe_edit_only"/> |
1844 | <h1> |
1845 | <field name="name" class="oe_inline"/> |
1846 | - <field name="kanban_state" invisible='1'/> |
1847 | - <button name="set_kanban_state_done" help="In Progress" attrs="{'invisible': [('kanban_state', 'in', ['done','blocked'])]}" type="object" icon="gtk-normal" class="oe_link oe_right"/> |
1848 | - <button name="set_kanban_state_blocked" help="Ready for Next Stage" attrs="{'invisible': [('kanban_state', 'in', ['normal','blocked'])]}" type="object" icon="gtk-yes" class="oe_link oe_right"/> |
1849 | - <button name="set_kanban_state_normal" help="Blocked" attrs="{'invisible': [('kanban_state', 'in', ['done','normal'])]}" type="object" icon="gtk-no" class="oe_link oe_right"/> |
1850 | </h1> |
1851 | + <div class="oe_right"> |
1852 | + <field name="kanban_state" class="oe_inline" widget="dropdown_selection"/> |
1853 | + </div> |
1854 | <label for="categ_ids" class="oe_edit_only"/> |
1855 | <field name="categ_ids" widget="many2many_tags"/> |
1856 | <group> |
1857 | @@ -78,7 +77,7 @@ |
1858 | <group> |
1859 | <field name="id"/> |
1860 | <field name="version_id" groups="base.group_user"/> |
1861 | - <field name="priority" groups="base.group_user"/> |
1862 | + <field name="priority" groups="base.group_user" widget="priority"/> |
1863 | <label for="task_id" groups="base.group_user"/> |
1864 | <div groups="base.group_user"> |
1865 | <field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/> |
1866 | @@ -186,7 +185,7 @@ |
1867 | <field name="model">project.issue</field> |
1868 | <field name="arch" type="xml"> |
1869 | <kanban default_group_by="stage_id"> |
1870 | - <field name="stage_id"/> |
1871 | + <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/> |
1872 | <field name="color"/> |
1873 | <field name="priority"/> |
1874 | <field name="user_email"/> |
1875 | @@ -220,28 +219,19 @@ |
1876 | <div class="oe_kanban_footer_left"> |
1877 | <field name="categ_ids"/> |
1878 | <div class="oe_right"> |
1879 | - <span class="oe_kanban_highlight" groups="base.group_user"> |
1880 | - <a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a> |
1881 | - <a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready for next stage" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a> |
1882 | - <a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a> |
1883 | - <t t-set="priority" t-value="record.priority.raw_value || 5"/> |
1884 | - <a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority"> |
1885 | - <img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/> |
1886 | - </a> |
1887 | - <a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority"> |
1888 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/> |
1889 | - </a> |
1890 | - <a type="object" name="set_priority" args="['2']" title="High Priority"> |
1891 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/> |
1892 | - </a> |
1893 | - <a type="object" name="set_priority" args="['1']" title="Highest Priority"> |
1894 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/> |
1895 | - </a> |
1896 | - </span> |
1897 | - <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())"> |
1898 | - <span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span> |
1899 | - </t> |
1900 | - <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"/> |
1901 | + <table> |
1902 | + <tr> |
1903 | + <td groups="base.group_user"> |
1904 | + <field name="kanban_state" widget="dropdown_selection"/> |
1905 | + </td> |
1906 | + <td groups="base.group_user"> |
1907 | + <field name="priority" widget="priority"/> |
1908 | + </td> |
1909 | + <td> |
1910 | + <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"/> |
1911 | + </td> |
1912 | + </tr> |
1913 | + </table> |
1914 | </div> |
1915 | </div> |
1916 | <div class="oe_kanban_footer_left"> |
1917 | @@ -301,13 +291,16 @@ |
1918 | <field name="inherit_id" ref="project.edit_project"/> |
1919 | <field name="arch" type="xml"> |
1920 | <xpath expr='//div[@name="options_active"]' position='inside'> |
1921 | - <field name="use_issues" class="oe_inline" |
1922 | + <div> |
1923 | + <field name="use_issues" class="oe_inline oe_from_boolean_align" |
1924 | on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/> |
1925 | - <label for="use_issues"/> |
1926 | + <label for="issue_label" class="oe_edit_only"/> |
1927 | + <b><field name="issue_label" class="oe_inline"/></b> |
1928 | + </div> |
1929 | </xpath> |
1930 | <xpath expr='//div[@name="buttons"]' position='inside'> |
1931 | - <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_issues','=', 0)]}" |
1932 | - name="%(act_project_project_2_project_issue_all)d" icon="fa-bug"> |
1933 | + <button class="oe_inline oe_stat_button" type="object" attrs="{'invisible':[('use_issues','=', 0)]}" |
1934 | + name="project_issues_action" icon="fa-bug"> |
1935 | <field string="Issues" name="issue_count" widget="statinfo"/> |
1936 | </button> |
1937 | </xpath> |
1938 | @@ -320,6 +313,9 @@ |
1939 | <field name="sequence" position="before"> |
1940 | <field name="project_escalation_id"/> |
1941 | </field> |
1942 | + <xpath expr='//page[@name="project_stages"]' position="attributes"> |
1943 | + <attribute name="attrs">{'invisible': [('use_issues', '=', False), ('use_tasks', '=', False)]}</attribute> |
1944 | + </xpath> |
1945 | </field> |
1946 | </record> |
1947 | |
1948 | @@ -334,10 +330,8 @@ |
1949 | </field> |
1950 | <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside"> |
1951 | <a t-if="record.use_issues.raw_value" style="margin-right: 10px" |
1952 | - name="%(act_project_project_2_project_issue_all)d" type="action"> |
1953 | - <t t-raw="record.issue_ids.raw_value.length"/> |
1954 | - <span t-if="record.issue_ids.raw_value.length == 1">Issue</span> |
1955 | - <span t-if="record.issue_ids.raw_value.length > 1">Issues</span> |
1956 | + name="project_issues_action" type="object"> |
1957 | + <span><field name="issue_count"/> <field name="issue_label"/></span> |
1958 | </a> |
1959 | </xpath> |
1960 | </field> |
1961 | @@ -350,8 +344,11 @@ |
1962 | <field eval="18" name="priority"/> |
1963 | <field name="arch" type="xml"> |
1964 | <xpath expr='//div[@name="project"]' position='inside'> |
1965 | - <field name="use_issues"/> |
1966 | - <label for="use_issues"/> |
1967 | + <div class="oe_left"> |
1968 | + <field name="use_issues" class="oe_from_boolean_align"/> |
1969 | + <label for="issue_label" class="oe_edit_only"/> |
1970 | + <b><field name="issue_label" class="oe_inline"/></b> |
1971 | + </div> |
1972 | </xpath> |
1973 | </field> |
1974 | </record> |
1975 | @@ -370,6 +367,17 @@ |
1976 | </field> |
1977 | </record> |
1978 | |
1979 | + <record id="view_project_task_type_form_inherited" model="ir.ui.view"> |
1980 | + <field name="name">project.task.type.form.inherited</field> |
1981 | + <field name="model">project.task.type</field> |
1982 | + <field name="inherit_id" ref="project.task_type_edit"/> |
1983 | + <field name="arch" type="xml"> |
1984 | + <xpath expr='//field[@name="type"]' position="attributes"> |
1985 | + <attribute name="invisible">0</attribute> |
1986 | + </xpath> |
1987 | + </field> |
1988 | + </record> |
1989 | + |
1990 | <!-- res.partner --> |
1991 | <record model="ir.ui.view" id="res_partner_issues_button_view"> |
1992 | <field name="name">res.partner.issues.button.view</field> |
1993 | |
1994 | === modified file 'project_issue/report/project_issue_report.py' |
1995 | --- project_issue/report/project_issue_report.py 2013-10-27 12:31:04 +0000 |
1996 | +++ project_issue/report/project_issue_report.py 2014-05-07 10:11:23 +0000 |
1997 | @@ -47,7 +47,7 @@ |
1998 | 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg", |
1999 | help="Number of Days to close the project issue"), |
2000 | 'company_id' : fields.many2one('res.company', 'Company'), |
2001 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
2002 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
2003 | 'project_id':fields.many2one('project.project', 'Project',readonly=True), |
2004 | 'version_id': fields.many2one('project.issue.version', 'Version'), |
2005 | 'user_id' : fields.many2one('res.users', 'Assigned to',readonly=True), |
2006 | |
2007 | === modified file 'project_timesheet/project_timesheet_view.xml' |
2008 | --- project_timesheet/project_timesheet_view.xml 2014-04-15 12:57:15 +0000 |
2009 | +++ project_timesheet/project_timesheet_view.xml 2014-05-07 10:11:23 +0000 |
2010 | @@ -25,7 +25,7 @@ |
2011 | <field name="model">project.project</field> |
2012 | <field name="inherit_id" ref="project.edit_project"/> |
2013 | <field name="arch" type="xml"> |
2014 | - <xpath expr='//div[@name="options_active"]' position='inside'> |
2015 | + <xpath expr='//div[@name="options_active"]' position='before'> |
2016 | <field name="use_timesheets" class="oe_inline"/> |
2017 | <label for="use_timesheets"/> |
2018 | </xpath> |
A .THIS file has been left in the code... please remove it
(we will review the code later)