Merge lp:~openerp-dev/openobject-addons/trunk-legend-widget-mba-1 into lp:openobject-addons
- trunk-legend-widget-mba-1
- Merge into trunk
Proposed by
Mahendra Barad(OpenERP)
Status: | Merged |
---|---|
Merged at revision: | 9429 |
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-legend-widget-mba-1 |
Merge into: | lp:openobject-addons |
Diff against target: |
1100 lines (+125/-234) 29 files modified
crm/crm.py (+5/-5) crm/crm_lead.py (+0/-15) crm/crm_lead_demo.xml (+15/-15) crm/crm_lead_view.xml (+6/-5) crm/crm_phonecall.py (+2/-2) crm/crm_phonecall_demo.xml (+5/-5) crm/crm_phonecall_view.xml (+1/-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 (+4/-20) hr_recruitment/hr_recruitment_demo.xml (+1/-1) hr_recruitment/hr_recruitment_view.xml (+6/-17) portal_project_issue/portal_project_issue_view.xml (+1/-15) project/project.py (+6/-25) project/project_data.xml (+6/-0) project/project_demo.xml (+4/-4) project/project_view.xml (+11/-15) project/report/project_report.py (+1/-1) project_issue/project_issue.py (+4/-25) project_issue/project_issue_data.xml (+6/-0) project_issue/project_issue_demo.xml (+10/-10) project_issue/project_issue_view.xml (+11/-31) project_issue/report/project_issue_report.py (+1/-1) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-legend-widget-mba-1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+206482@code.launchpad.net |
Commit message
Description of the change
[IMP] crm, hr_recruitment, project, project_issue: use the newly-introduced widgets for the kanban state and the priority management.
This branch comes with a web branch holding those new widgets for form and kanban views.
To post a comment you must log in.
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-08 15:35:32 +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 | |
22 | === modified file 'crm/crm_lead.py' |
23 | --- crm/crm_lead.py 2014-05-07 10:09:54 +0000 |
24 | +++ crm/crm_lead.py 2014-05-08 15:35:32 +0000 |
25 | @@ -455,21 +455,6 @@ |
26 | self.write(cr, uid, [case.id], data, context=context) |
27 | return True |
28 | |
29 | - def set_priority(self, cr, uid, ids, priority, context=None): |
30 | - """ Set lead priority |
31 | - """ |
32 | - return self.write(cr, uid, ids, {'priority': priority}, context=context) |
33 | - |
34 | - def set_high_priority(self, cr, uid, ids, context=None): |
35 | - """ Set lead priority to high |
36 | - """ |
37 | - return self.set_priority(cr, uid, ids, '1', context=context) |
38 | - |
39 | - def set_normal_priority(self, cr, uid, ids, context=None): |
40 | - """ Set lead priority to normal |
41 | - """ |
42 | - return self.set_priority(cr, uid, ids, '3', context=context) |
43 | - |
44 | def _merge_get_result_type(self, cr, uid, opps, context=None): |
45 | """ |
46 | Define the type of the result of the merge. If at least one of the |
47 | |
48 | === modified file 'crm/crm_lead_demo.xml' |
49 | --- crm/crm_lead_demo.xml 2013-10-27 12:31:04 +0000 |
50 | +++ crm/crm_lead_demo.xml 2014-05-08 15:35:32 +0000 |
51 | @@ -54,7 +54,7 @@ |
52 | <field name="type_id" ref="type_lead7"/> |
53 | <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/> |
54 | <field name="channel_id" ref="crm_case_channel_website"/> |
55 | - <field name="priority">4</field> |
56 | + <field name="priority">1</field> |
57 | <field name="section_id" ref="section_sales_department"/> |
58 | <field name="user_id" ref="base.user_root"/> |
59 | <field name="stage_id" ref="stage_lead1"/> |
60 | @@ -104,7 +104,7 @@ |
61 | <field name="type_id" ref="type_lead8"/> |
62 | <field name="categ_ids" eval="[(6, 0, [categ_oppor5])]"/> |
63 | <field name="channel_id" ref=""/> |
64 | - <field name="priority">3</field> |
65 | + <field name="priority">2</field> |
66 | <field name="section_id" ref="crm_case_section_2"/> |
67 | <field name="user_id" ref="base.user_demo"/> |
68 | <field name="stage_id" ref="stage_lead6"/> |
69 | @@ -129,7 +129,7 @@ |
70 | <field name="type_id" ref="type_lead3"/> |
71 | <field name="categ_ids" eval="[(6, 0, [categ_oppor1])]"/> |
72 | <field name="channel_id" ref="crm_case_channel_website"/> |
73 | - <field name="priority">3</field> |
74 | + <field name="priority">2</field> |
75 | <field name="section_id" ref="crm_case_section_1"/> |
76 | <field name="user_id" ref=""/> |
77 | <field name="stage_id" ref="stage_lead1"/> |
78 | @@ -156,7 +156,7 @@ |
79 | <field name="type_id" ref="type_lead3"/> |
80 | <field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/> |
81 | <field name="channel_id" ref=""/> |
82 | - <field name="priority">3</field> |
83 | + <field name="priority">2</field> |
84 | <field name="section_id" ref="crm_case_section_2"/> |
85 | <field name="user_id" ref=""/> |
86 | <field name="stage_id" ref="stage_lead1"/> |
87 | @@ -174,7 +174,7 @@ |
88 | <field name="type_id" ref="type_lead8"/> |
89 | <field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/> |
90 | <field name="channel_id" ref=""/> |
91 | - <field name="priority">5</field> |
92 | + <field name="priority">0</field> |
93 | <field name="section_id" ref="crm_case_section_2"/> |
94 | <field name="user_id" ref="base.user_root"/> |
95 | <field name="stage_id" ref="stage_lead1"/> |
96 | @@ -193,7 +193,7 @@ |
97 | <field name="type_id" ref="type_lead5"/> |
98 | <field name="categ_ids" eval="[(6, 0, [categ_oppor6,categ_oppor8])]"/> |
99 | <field name="channel_id" ref=""/> |
100 | - <field name="priority">4</field> |
101 | + <field name="priority">1</field> |
102 | <field name="section_id" ref="section_sales_department"/> |
103 | <field name="user_id" ref="base.user_root"/> |
104 | <field name="stage_id" ref="stage_lead1"/> |
105 | @@ -253,7 +253,7 @@ |
106 | <field name="type_id" ref="type_lead3"/> |
107 | <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/> |
108 | <field name="channel_id" ref="crm_case_channel_direct"/> |
109 | - <field name="priority">3</field> |
110 | + <field name="priority">2</field> |
111 | <field name="section_id" ref="crm_case_section_1"/> |
112 | <field name="user_id" ref=""/> |
113 | <field name="stage_id" ref="stage_lead1"/> |
114 | @@ -331,7 +331,7 @@ |
115 | <field name="type_id" ref="type_lead3"/> |
116 | <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/> |
117 | <field name="channel_id" ref="crm_case_channel_website"/> |
118 | - <field name="priority">3</field> |
119 | + <field name="priority">2</field> |
120 | <field eval="time.strftime('%Y-%m-23')" name="date_deadline"/> |
121 | <field eval="time.strftime('%Y-%m-10')" name="date_action"/> |
122 | <field name="title_action">Send Catalogue by Email</field> |
123 | @@ -404,7 +404,7 @@ |
124 | <field name="type_id" ref="type_lead3"/> |
125 | <field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/> |
126 | <field name="channel_id" ref="crm_case_channel_website"/> |
127 | - <field name="priority">4</field> |
128 | + <field name="priority">1</field> |
129 | <field eval="time.strftime('%Y-%m-8')" name="date_deadline"/> |
130 | <field eval="time.strftime('%Y-%m-3')" name="date_action"/> |
131 | <field name="title_action">Send price list regarding our interventions</field> |
132 | @@ -431,7 +431,7 @@ |
133 | <field name="partner_id" ref="base.res_partner_4"/> |
134 | <field name="type_id" ref="type_lead8"/> |
135 | <field name="categ_ids" eval="[(6, 0, [categ_oppor4,categ_oppor6])]"/> |
136 | - <field name="priority">4</field> |
137 | + <field name="priority">1</field> |
138 | <field eval="time.strftime('%Y-%m-13')" name="date_deadline"/> |
139 | <field eval="time.strftime('%Y-%m-4')" name="date_action"/> |
140 | <field name="title_action">Call to define real needs about training</field> |
141 | @@ -492,7 +492,7 @@ |
142 | <field name="type_id" ref="type_lead2"/> |
143 | <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/> |
144 | <field name="channel_id" ref="crm_case_channel_phone"/> |
145 | - <field name="priority">3</field> |
146 | + <field name="priority">2</field> |
147 | <field name="section_id" ref="crm_case_section_2"/> |
148 | <field name="user_id" ref="base.user_root"/> |
149 | <field name="stage_id" ref="crm.stage_lead4"/> |
150 | @@ -510,7 +510,7 @@ |
151 | <field name="type_id" ref="type_lead7"/> |
152 | <field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/> |
153 | <field name="channel_id" ref="crm_case_channel_email"/> |
154 | - <field name="priority">3</field> |
155 | + <field name="priority">1</field> |
156 | <field name="section_id" ref="crm_case_section_2"/> |
157 | <field name="user_id" ref="base.user_root"/> |
158 | <field name="stage_id" ref="crm.stage_lead5"/> |
159 | @@ -525,7 +525,7 @@ |
160 | <field name="type_id" ref="type_lead5"/> |
161 | <field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/> |
162 | <field name="channel_id" ref="crm_case_channel_direct"/> |
163 | - <field name="priority">5</field> |
164 | + <field name="priority">0</field> |
165 | <field name="section_id" ref="section_sales_department"/> |
166 | <field name="user_id" ref="base.user_demo"/> |
167 | <field name="stage_id" ref="crm.stage_lead5"/> |
168 | @@ -543,7 +543,7 @@ |
169 | <field name="type_id" ref="type_lead8"/> |
170 | <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/> |
171 | <field name="channel_id" ref="crm_case_channel_website"/> |
172 | - <field name="priority">5</field> |
173 | + <field name="priority">0</field> |
174 | <field eval="time.strftime('%Y-%m-6')" name="date_deadline"/> |
175 | <field name="section_id" ref="section_sales_department"/> |
176 | <field name="user_id" ref="base.user_root"/> |
177 | @@ -588,7 +588,7 @@ |
178 | <field name="type_id" ref="type_lead3"/> |
179 | <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/> |
180 | <field name="channel_id" ref="crm_case_channel_website"/> |
181 | - <field name="priority">3</field> |
182 | + <field name="priority">2</field> |
183 | <field eval="time.strftime('%Y-%m-23')" name="date_deadline"/> |
184 | <field eval="time.strftime('%Y-%m-10')" name="date_action"/> |
185 | <field name="title_action">Send Catalogue by Email</field> |
186 | |
187 | === modified file 'crm/crm_lead_view.xml' |
188 | --- crm/crm_lead_view.xml 2014-05-02 13:22:58 +0000 |
189 | +++ crm/crm_lead_view.xml 2014-05-08 15:35:32 +0000 |
190 | @@ -158,7 +158,7 @@ |
191 | <field name="type" invisible="1"/> |
192 | </group> |
193 | <group> |
194 | - <field name="priority"/> |
195 | + <field name="priority" widget="priority"/> |
196 | <field name="categ_ids" |
197 | widget="many2many_tags" |
198 | domain="[('object_id.model','=','crm.lead')]" |
199 | @@ -303,9 +303,10 @@ |
200 | <field name="title_action"/> |
201 | </div> |
202 | <div class="oe_kanban_bottom_right"> |
203 | - <a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a> |
204 | - <a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a> |
205 | - <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"/> |
206 | + <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/> |
207 | + <div class="pull-left" groups="base.group_user"> |
208 | + <field name="priority" widget="priority"/> |
209 | + </div> |
210 | </div> |
211 | <div class="oe_kanban_footer_left"> |
212 | <t t-raw="record.message_summary.raw_value"/> |
213 | @@ -430,7 +431,7 @@ |
214 | <field name="title_action" class="oe_inline" nolabel="1" placeholder="e.g. Call for proposal"/> |
215 | </div> |
216 | <field name="date_deadline"/> |
217 | - <field name="priority"/> |
218 | + <field name="priority" widget="priority"/> |
219 | </group> |
220 | |
221 | <group> |
222 | |
223 | === modified file 'crm/crm_phonecall.py' |
224 | --- crm/crm_phonecall.py 2014-05-07 09:45:53 +0000 |
225 | +++ crm/crm_phonecall.py 2014-05-08 15:35:32 +0000 |
226 | @@ -62,7 +62,7 @@ |
227 | ('object_id.model', '=', 'crm.phonecall')]"), |
228 | 'partner_phone': fields.char('Phone', size=32), |
229 | 'partner_mobile': fields.char('Mobile', size=32), |
230 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
231 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
232 | 'date_closed': fields.datetime('Closed', readonly=True), |
233 | 'date': fields.datetime('Date'), |
234 | 'opportunity_id': fields.many2one ('crm.lead', 'Lead/Opportunity'), |
235 | @@ -75,7 +75,7 @@ |
236 | |
237 | _defaults = { |
238 | 'date': fields.datetime.now, |
239 | - 'priority': crm.AVAILABLE_PRIORITIES[2][0], |
240 | + 'priority': '1', |
241 | 'state': _get_default_state, |
242 | 'user_id': lambda self, cr, uid, ctx: uid, |
243 | 'active': 1 |
244 | |
245 | === modified file 'crm/crm_phonecall_demo.xml' |
246 | --- crm/crm_phonecall_demo.xml 2013-10-27 12:31:04 +0000 |
247 | +++ crm/crm_phonecall_demo.xml 2014-05-08 15:35:32 +0000 |
248 | @@ -6,7 +6,7 @@ |
249 | <record id="crm_phonecall_1" model="crm.phonecall"> |
250 | <field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/> |
251 | <field name="partner_id" ref="base.res_partner_11"/> |
252 | - <field eval="'3'" name="priority"/> |
253 | + <field eval="'1'" name="priority"/> |
254 | <field name="user_id" ref="base.user_root"/> |
255 | <field name="name">Left the message</field> |
256 | <field name="state">done</field> |
257 | @@ -19,7 +19,7 @@ |
258 | <record id="crm_phonecall_2" model="crm.phonecall"> |
259 | <field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/> |
260 | <field name="partner_id" ref="base.res_partner_7"/> |
261 | - <field eval="'4'" name="priority"/> |
262 | + <field eval="'0'" name="priority"/> |
263 | <field name="user_id" ref="base.user_root"/> |
264 | <field name="name">Need more information on the proposed deal</field> |
265 | <field name="state">done</field> |
266 | @@ -44,7 +44,7 @@ |
267 | </record> |
268 | <record id="crm_phonecall_4" model="crm.phonecall"> |
269 | <field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/> |
270 | - <field eval="'3'" name="priority"/> |
271 | + <field eval="'1'" name="priority"/> |
272 | <field name="user_id" ref="base.user_root"/> |
273 | <field name="name">Wanted information about pricing of laptops</field> |
274 | <field name="state">done</field> |
275 | @@ -58,7 +58,7 @@ |
276 | <record id="crm_phonecall_5" model="crm.phonecall"> |
277 | <field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/> |
278 | <field name="partner_id" ref="base.res_partner_5"/> |
279 | - <field eval="'3'" name="priority"/> |
280 | + <field eval="'1'" name="priority"/> |
281 | <field name="user_id" ref="base.user_root"/> |
282 | <field name="name">More information on the proposed deal</field> |
283 | <field name="state">pending</field> |
284 | @@ -69,7 +69,7 @@ |
285 | <field eval="2.08" name="duration"/> |
286 | </record> |
287 | <record id="crm_phonecall_6" model="crm.phonecall"> |
288 | - <field eval="'3'" name="priority"/> |
289 | + <field eval="'1'" name="priority"/> |
290 | <field name="user_id" ref="base.user_root"/> |
291 | <field name="name">Proposal for discount offer</field> |
292 | <field name="state">open</field> |
293 | |
294 | === modified file 'crm/crm_phonecall_view.xml' |
295 | --- crm/crm_phonecall_view.xml 2014-05-02 13:07:53 +0000 |
296 | +++ crm/crm_phonecall_view.xml 2014-05-08 15:35:32 +0000 |
297 | @@ -103,7 +103,7 @@ |
298 | <field name="categ_id" widget="selection" |
299 | domain="[('object_id.model', '=', 'crm.phonecall')]"/> |
300 | <field name="partner_mobile"/> |
301 | - <field name="priority"/> |
302 | + <field name="priority" widget="priority"/> |
303 | <field name="opportunity_id" on_change="on_change_opportunity(opportunity_id)"/> |
304 | </group> |
305 | <field name="description" placeholder="Description..."/> |
306 | |
307 | === modified file 'crm/report/crm_phonecall_report.py' |
308 | --- crm/report/crm_phonecall_report.py 2014-01-29 09:56:55 +0000 |
309 | +++ crm/report/crm_phonecall_report.py 2014-05-08 15:35:32 +0000 |
310 | @@ -42,7 +42,7 @@ |
311 | _columns = { |
312 | 'user_id':fields.many2one('res.users', 'User', readonly=True), |
313 | 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True), |
314 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
315 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
316 | 'nbr': fields.integer('# of Cases', readonly=True), |
317 | 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True), |
318 | 'create_date': fields.datetime('Create Date', readonly=True, select=True), |
319 | |
320 | === modified file 'crm_claim/crm_claim.py' |
321 | --- crm_claim/crm_claim.py 2014-05-07 08:17:23 +0000 |
322 | +++ crm_claim/crm_claim.py 2014-05-08 15:35:32 +0000 |
323 | @@ -88,7 +88,7 @@ |
324 | 'categ_id': fields.many2one('crm.case.categ', 'Category', \ |
325 | domain="[('section_id','=',section_id),\ |
326 | ('object_id.model', '=', 'crm.claim')]"), |
327 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
328 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
329 | 'type_action': fields.selection([('correction','Corrective Action'),('prevention','Preventive Action')], 'Action Type'), |
330 | 'user_id': fields.many2one('res.users', 'Responsible'), |
331 | 'user_fault': fields.char('Trouble Responsible', size=64), |
332 | @@ -111,7 +111,7 @@ |
333 | 'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c), |
334 | 'date': fields.datetime.now, |
335 | 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c), |
336 | - 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], |
337 | + 'priority': '1', |
338 | 'active': lambda *a: 1, |
339 | 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c) |
340 | } |
341 | |
342 | === modified file 'crm_claim/crm_claim_demo.xml' |
343 | --- crm_claim/crm_claim_demo.xml 2012-11-29 22:26:45 +0000 |
344 | +++ crm_claim/crm_claim_demo.xml 2014-05-08 15:35:32 +0000 |
345 | @@ -9,7 +9,7 @@ |
346 | <record id="crm_claim_1" model="crm.claim"> |
347 | <field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/> |
348 | <field name="partner_id" ref="base.res_partner_11"/> |
349 | - <field eval=""3"" name="priority"/> |
350 | + <field eval=""1"" name="priority"/> |
351 | <field name="user_id" ref="base.user_root"/> |
352 | <field eval=""Problem with the delivery of goods"" name="name"/> |
353 | <field name="section_id" ref="crm.section_sales_department"/> |
354 | @@ -21,7 +21,7 @@ |
355 | <record id="crm_claim_2" model="crm.claim"> |
356 | <field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/> |
357 | <field name="partner_id" ref="base.res_partner_6"/> |
358 | - <field eval=""4"" name="priority"/> |
359 | + <field eval=""0"" name="priority"/> |
360 | <field name="user_id" ref="base.user_root"/> |
361 | <field eval=""Damaged Products"" name="name"/> |
362 | <field name="section_id" ref="crm.section_sales_department"/> |
363 | @@ -46,7 +46,7 @@ |
364 | <record id="crm_claim_4" model="crm.claim"> |
365 | <field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/> |
366 | <field name="partner_id" ref="base.res_partner_18"/> |
367 | - <field eval=""3"" name="priority"/> |
368 | + <field eval=""1"" name="priority"/> |
369 | <field name="user_id" ref="base.user_root"/> |
370 | <field eval=""Product quality not maintained"" name="name"/> |
371 | <field name="section_id" ref="crm.section_sales_department"/> |
372 | @@ -58,7 +58,7 @@ |
373 | <record id="crm_claim_5" model="crm.claim"> |
374 | <field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/> |
375 | <field name="partner_id" ref="base.res_partner_5"/> |
376 | - <field eval=""3"" name="priority"/> |
377 | + <field eval=""1"" name="priority"/> |
378 | <field name="user_id" ref="base.user_root"/> |
379 | <field eval=""Some products missing"" name="name"/> |
380 | <field name="section_id" ref="crm.section_sales_department"/> |
381 | @@ -69,7 +69,7 @@ |
382 | |
383 | <record id="crm_claim_6" model="crm.claim"> |
384 | <field name="partner_id" ref="base.res_partner_9"/> |
385 | - <field eval=""3"" name="priority"/> |
386 | + <field eval=""1"" name="priority"/> |
387 | <field name="user_id" ref="base.user_root"/> |
388 | <field eval=""Problem with the delivery of assignments"" name="name"/> |
389 | <field name="section_id" ref="crm.section_sales_department"/> |
390 | @@ -82,7 +82,7 @@ |
391 | |
392 | <record id="crm_claim_7" model="crm.claim"> |
393 | <field name="partner_id" ref="base.res_partner_19"/> |
394 | - <field eval=""3"" name="priority"/> |
395 | + <field eval=""1"" name="priority"/> |
396 | <field name="user_id" ref="base.user_root"/> |
397 | <field eval=""Documents unclear"" name="name"/> |
398 | <field name="section_id" ref="crm.section_sales_department"/> |
399 | |
400 | === modified file 'crm_claim/crm_claim_view.xml' |
401 | --- crm_claim/crm_claim_view.xml 2013-10-27 12:31:04 +0000 |
402 | +++ crm_claim/crm_claim_view.xml 2014-05-08 15:35:32 +0000 |
403 | @@ -107,7 +107,7 @@ |
404 | </group> |
405 | <group colspan="4" col="4" groups="base.group_user"> |
406 | <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/> |
407 | - <field name="priority"/> |
408 | + <field name="priority" widget="priority"/> |
409 | <field name="section_id" groups="base.group_multi_salesteams"/> |
410 | <field name="date_deadline"/> |
411 | </group> |
412 | |
413 | === modified file 'crm_claim/report/crm_claim_report.py' |
414 | --- crm_claim/report/crm_claim_report.py 2013-10-27 12:31:04 +0000 |
415 | +++ crm_claim/report/crm_claim_report.py 2014-05-08 15:35:32 +0000 |
416 | @@ -23,11 +23,9 @@ |
417 | from openerp import tools |
418 | |
419 | AVAILABLE_PRIORITIES = [ |
420 | - ('5', 'Lowest'), |
421 | - ('4', 'Low'), |
422 | - ('3', 'Normal'), |
423 | - ('2', 'High'), |
424 | - ('1', 'Highest') |
425 | + ('0', 'Low'), |
426 | + ('1', 'Normal'), |
427 | + ('2', 'High') |
428 | ] |
429 | |
430 | |
431 | |
432 | === modified file 'crm_helpdesk/crm_helpdesk.py' |
433 | --- crm_helpdesk/crm_helpdesk.py 2013-11-27 15:32:57 +0000 |
434 | +++ crm_helpdesk/crm_helpdesk.py 2014-05-08 15:35:32 +0000 |
435 | @@ -59,7 +59,7 @@ |
436 | 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."), |
437 | 'planned_revenue': fields.float('Planned Revenue'), |
438 | 'planned_cost': fields.float('Planned Costs'), |
439 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
440 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
441 | 'probability': fields.float('Probability (%)'), |
442 | 'categ_id': fields.many2one('crm.case.categ', 'Category', \ |
443 | domain="['|',('section_id','=',False),('section_id','=',section_id),\ |
444 | @@ -83,7 +83,7 @@ |
445 | 'state': lambda *a: 'draft', |
446 | 'date': fields.datetime.now, |
447 | 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c), |
448 | - 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0], |
449 | + 'priority': '1', |
450 | } |
451 | |
452 | def on_change_partner_id(self, cr, uid, ids, partner_id, context=None): |
453 | |
454 | === modified file 'crm_helpdesk/crm_helpdesk_demo.xml' |
455 | --- crm_helpdesk/crm_helpdesk_demo.xml 2012-11-29 22:26:45 +0000 |
456 | +++ crm_helpdesk/crm_helpdesk_demo.xml 2014-05-08 15:35:32 +0000 |
457 | @@ -5,7 +5,7 @@ |
458 | <field eval="1" name="active"/> |
459 | <field name="user_id" ref="base.user_root"/> |
460 | <field name="company_id" ref="base.main_company"/> |
461 | - <field name="priority">3</field> |
462 | + <field name="priority">1</field> |
463 | <field name="state">draft</field> |
464 | <field name="section_id" ref="crm.section_sales_department"/> |
465 | <field name="date" eval="time.strftime('%Y-%m-04 11:10:36')"/> |
466 | @@ -17,7 +17,7 @@ |
467 | <field eval="1" name="active"/> |
468 | <field name="user_id" ref="base.user_demo"/> |
469 | <field name="company_id" ref="base.main_company"/> |
470 | - <field name="priority">3</field> |
471 | + <field name="priority">1</field> |
472 | <field name="state">draft</field> |
473 | <field name="section_id" ref="crm.section_sales_department"/> |
474 | <field name="date" eval="time.strftime('%Y-%m-12 11:12:09')"/> |
475 | @@ -42,7 +42,7 @@ |
476 | <field name="partner_id" ref="base.res_partner_2"/> |
477 | <field name="user_id" ref="base.user_root"/> |
478 | <field name="company_id" ref="base.main_company"/> |
479 | - <field name="priority">3</field> |
480 | + <field name="priority">1</field> |
481 | <field name="state">draft</field> |
482 | <field name="date" eval="time.strftime('%Y-%m-12 11:15:17')"/> |
483 | <field name="name">How to create a new module</field> |
484 | |
485 | === modified file 'crm_helpdesk/crm_helpdesk_view.xml' |
486 | --- crm_helpdesk/crm_helpdesk_view.xml 2014-04-17 11:26:55 +0000 |
487 | +++ crm_helpdesk/crm_helpdesk_view.xml 2014-05-08 15:35:32 +0000 |
488 | @@ -51,7 +51,7 @@ |
489 | <field name="email_from"/> |
490 | </group> |
491 | <group string="Categorization"> |
492 | - <field name="priority"/> |
493 | + <field name="priority" widget="priority"/> |
494 | <field name="categ_id" domain="[('object_id.model', '=', 'crm.helpdesk')]" context="{'object_name': 'crm.helpdesk'}"/> |
495 | <field name="channel_id"/> |
496 | </group> |
497 | |
498 | === modified file 'hr_recruitment/hr_recruitment.py' |
499 | --- hr_recruitment/hr_recruitment.py 2014-05-07 13:16:29 +0000 |
500 | +++ hr_recruitment/hr_recruitment.py 2014-05-08 15:35:32 +0000 |
501 | @@ -25,12 +25,11 @@ |
502 | |
503 | |
504 | AVAILABLE_PRIORITIES = [ |
505 | - ('', ''), |
506 | - ('5', 'Not Good'), |
507 | - ('4', 'On Average'), |
508 | + ('0', 'Bad'), |
509 | + ('1', 'Below Average'), |
510 | + ('2', 'Average'), |
511 | ('3', 'Good'), |
512 | - ('2', 'Very Good'), |
513 | - ('1', 'Excellent') |
514 | + ('4', 'Excellent') |
515 | ] |
516 | |
517 | class hr_recruitment_source(osv.osv): |
518 | @@ -489,21 +488,6 @@ |
519 | dict_act_window['view_mode'] = 'form,tree' |
520 | return dict_act_window |
521 | |
522 | - def set_priority(self, cr, uid, ids, priority, *args): |
523 | - """Set applicant priority |
524 | - """ |
525 | - return self.write(cr, uid, ids, {'priority': priority}) |
526 | - |
527 | - def set_high_priority(self, cr, uid, ids, *args): |
528 | - """Set applicant priority to high |
529 | - """ |
530 | - return self.set_priority(cr, uid, ids, '1') |
531 | - |
532 | - def set_normal_priority(self, cr, uid, ids, *args): |
533 | - """Set applicant priority to normal |
534 | - """ |
535 | - return self.set_priority(cr, uid, ids, '3') |
536 | - |
537 | def get_empty_list_help(self, cr, uid, help, context=None): |
538 | context['empty_list_help_model'] = 'hr.job' |
539 | context['empty_list_help_id'] = context.get('default_job_id', None) |
540 | |
541 | === modified file 'hr_recruitment/hr_recruitment_demo.xml' |
542 | --- hr_recruitment/hr_recruitment_demo.xml 2014-02-12 09:56:06 +0000 |
543 | +++ hr_recruitment/hr_recruitment_demo.xml 2014-05-08 15:35:32 +0000 |
544 | @@ -75,7 +75,7 @@ |
545 | <field name="type_id" ref="degree_licenced"/> |
546 | <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_reserve')])]"/> |
547 | <field name="user_id" ref="base.user_root"/> |
548 | - <field name="priority">4</field> |
549 | + <field name="priority">2</field> |
550 | <field name="partner_name">David Armstrong</field> |
551 | <field name="stage_id" ref="stage_job2"/> |
552 | <field name="partner_phone">33968745</field> |
553 | |
554 | === modified file 'hr_recruitment/hr_recruitment_view.xml' |
555 | --- hr_recruitment/hr_recruitment_view.xml 2014-04-15 15:01:46 +0000 |
556 | +++ hr_recruitment/hr_recruitment_view.xml 2014-05-08 15:35:32 +0000 |
557 | @@ -130,7 +130,7 @@ |
558 | <field name="date_action"/> |
559 | <field name="title_action" class="oe_inline" placeholder="e.g. Call for interview"/> |
560 | </div> |
561 | - <field name="priority"/> |
562 | + <field name="priority" widget="priority"/> |
563 | <field name="source_id"/> |
564 | <field name="reference"/> |
565 | </group> |
566 | @@ -293,22 +293,11 @@ |
567 | <field name="title_action"/> |
568 | </div> |
569 | <div style="width:240px"><field name="categ_ids"/></div> |
570 | - <div class="oe_kanban_right"> |
571 | - <t t-set="priority" t-value="record.priority.raw_value || 5"/> |
572 | - <a type="object" name="set_priority" args="['3']" t-if="priority gt 3"> |
573 | - <img src="/web/static/src/img/icons/star-off.png" width="16" height="16" title="Good"/> |
574 | - </a> |
575 | - <a type="object" name="set_priority" args="['5']" t-if="priority lte 3"> |
576 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16" title="Good"/> |
577 | - </a> |
578 | - <a type="object" name="set_priority" args="['2']"> |
579 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16" title="Very Good"/> |
580 | - </a> |
581 | - <a type="object" name="set_priority" args="['1']"> |
582 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16" title="Excellent"/> |
583 | - </a> |
584 | - <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"/> |
585 | - |
586 | + <div class="oe_kanban_bottom_right"> |
587 | + <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/> |
588 | + <div class="pull-left" groups="base.group_user"> |
589 | + <field name="priority" widget="priority"/> |
590 | + </div> |
591 | </div> |
592 | <div class="oe_kanban_footer_left" style="margin-top:5px;"> |
593 | <t t-raw="record.message_summary.raw_value"/> |
594 | |
595 | === modified file 'portal_project_issue/portal_project_issue_view.xml' |
596 | --- portal_project_issue/portal_project_issue_view.xml 2013-10-27 12:31:04 +0000 |
597 | +++ portal_project_issue/portal_project_issue_view.xml 2014-05-08 15:35:32 +0000 |
598 | @@ -38,21 +38,7 @@ |
599 | <field name="categ_ids"/> |
600 | <div class="oe_right"> |
601 | Creation: <field name="create_date"/> |
602 | - <span class="oe_kanban_highlight"> |
603 | - <t t-set="priority" t-value="record.priority.raw_value || 5"/> |
604 | - <a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority"> |
605 | - <img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/> |
606 | - </a> |
607 | - <a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority"> |
608 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/> |
609 | - </a> |
610 | - <a type="object" name="set_priority" args="['2']" title="High Priority"> |
611 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/> |
612 | - </a> |
613 | - <a type="object" name="set_priority" args="['1']" title="Highest Priority"> |
614 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/> |
615 | - </a> |
616 | - </span> |
617 | + <field name="priority" widget="priority"/> |
618 | <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())"> |
619 | <span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span> |
620 | </t> |
621 | |
622 | === modified file 'project/project.py' |
623 | --- project/project.py 2014-04-10 14:51:31 +0000 |
624 | +++ project/project.py 2014-05-08 15:35:32 +0000 |
625 | @@ -565,6 +565,7 @@ |
626 | }, |
627 | 'kanban_state': { |
628 | 'project.mt_task_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked', |
629 | + 'project.mt_task_ready': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'done', |
630 | }, |
631 | } |
632 | |
633 | @@ -740,18 +741,18 @@ |
634 | '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."), |
635 | 'name': fields.char('Task Summary', track_visibility='onchange', size=128, required=True, select=True), |
636 | 'description': fields.text('Description'), |
637 | - 'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True), |
638 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority', select=True), |
639 | 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."), |
640 | 'stage_id': fields.many2one('project.task.type', 'Stage', track_visibility='onchange', select=True, |
641 | domain="[('project_ids', '=', project_id)]"), |
642 | 'categ_ids': fields.many2many('project.category', string='Tags'), |
643 | - 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State', |
644 | + 'kanban_state': fields.selection([('normal', 'In Progress'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State', |
645 | track_visibility='onchange', |
646 | help="A task's kanban state indicates special situations affecting it:\n" |
647 | " * Normal is the default situation\n" |
648 | " * Blocked indicates something is preventing the progress of this task\n" |
649 | " * Ready for next stage indicates the task is ready to be pulled to the next stage", |
650 | - readonly=True, required=False), |
651 | + required=False), |
652 | 'create_date': fields.datetime('Create Date', readonly=True, select=True), |
653 | '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) |
654 | 'date_start': fields.datetime('Starting Date',select=True), |
655 | @@ -799,7 +800,7 @@ |
656 | 'project_id': _get_default_project_id, |
657 | 'date_last_stage_update': fields.datetime.now, |
658 | 'kanban_state': 'normal', |
659 | - 'priority': '2', |
660 | + 'priority': '1', |
661 | 'progress': 0, |
662 | 'sequence': 10, |
663 | 'active': True, |
664 | @@ -808,17 +809,7 @@ |
665 | 'partner_id': lambda self, cr, uid, ctx=None: self._get_default_partner(cr, uid, context=ctx), |
666 | } |
667 | _order = "priority, sequence, date_start, name, id" |
668 | - |
669 | - def set_high_priority(self, cr, uid, ids, *args): |
670 | - """Set task priority to high |
671 | - """ |
672 | - return self.write(cr, uid, ids, {'priority' : '0'}) |
673 | - |
674 | - def set_normal_priority(self, cr, uid, ids, *args): |
675 | - """Set task priority to normal |
676 | - """ |
677 | - return self.write(cr, uid, ids, {'priority' : '2'}) |
678 | - |
679 | + |
680 | def _check_recursion(self, cr, uid, ids, context=None): |
681 | for id in ids: |
682 | visited_branch = set() |
683 | @@ -1003,16 +994,6 @@ |
684 | def set_remaining_time_10(self, cr, uid, ids, context=None): |
685 | return self.set_remaining_time(cr, uid, ids, 10.0, context) |
686 | |
687 | - def set_kanban_state_blocked(self, cr, uid, ids, context=None): |
688 | - return self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context) |
689 | - |
690 | - def set_kanban_state_normal(self, cr, uid, ids, context=None): |
691 | - return self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context) |
692 | - |
693 | - def set_kanban_state_done(self, cr, uid, ids, context=None): |
694 | - self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context) |
695 | - return False |
696 | - |
697 | def _store_history(self, cr, uid, ids, context=None): |
698 | for task in self.browse(cr, uid, ids, context=context): |
699 | self.pool.get('project.task.history').create(cr, uid, { |
700 | |
701 | === modified file 'project/project_data.xml' |
702 | --- project/project_data.xml 2014-02-21 11:27:04 +0000 |
703 | +++ project/project_data.xml 2014-05-08 15:35:32 +0000 |
704 | @@ -93,6 +93,12 @@ |
705 | <field name="default" eval="False"/> |
706 | <field name="description">Task blocked</field> |
707 | </record> |
708 | + <record id="mt_task_ready" model="mail.message.subtype"> |
709 | + <field name="name">Task Ready for Next Stage</field> |
710 | + <field name="res_model">project.task</field> |
711 | + <field name="default" eval="False"/> |
712 | + <field name="description">Task Ready for Next Stage</field> |
713 | + </record> |
714 | <record id="mt_task_stage" model="mail.message.subtype"> |
715 | <field name="name">Stage Changed</field> |
716 | <field name="res_model">project.task</field> |
717 | |
718 | === modified file 'project/project_demo.xml' |
719 | --- project/project_demo.xml 2013-11-27 15:32:57 +0000 |
720 | +++ project/project_demo.xml 2014-05-08 15:35:32 +0000 |
721 | @@ -110,7 +110,7 @@ |
722 | <field name="planned_hours" eval="40.0"/> |
723 | <field name="remaining_hours" eval="40.0"/> |
724 | <field name="user_id" ref="base.user_demo"/> |
725 | - <field name="priority">4</field> |
726 | + <field name="priority">0</field> |
727 | <field name="project_id" ref="project.project_project_1"/> |
728 | <field name="name">Prepare Requirements Document</field> |
729 | <field name="stage_id" ref="project_tt_analysis"/> |
730 | @@ -120,7 +120,7 @@ |
731 | <field name="planned_hours" eval="32.0"/> |
732 | <field name="remaining_hours" eval="32.0"/> |
733 | <field name="user_id" ref="base.user_demo"/> |
734 | - <field name="priority">4</field> |
735 | + <field name="priority">0</field> |
736 | <field name="project_id" ref="project.project_project_1"/> |
737 | <field name="name">Make SRS</field> |
738 | <field name="stage_id" ref="project_tt_specification"/> |
739 | @@ -129,7 +129,7 @@ |
740 | <field name="planned_hours" eval="10.0"/> |
741 | <field name="remaining_hours" eval="10.0"/> |
742 | <field name="user_id" ref="base.user_root"/> |
743 | - <field name="priority">4</field> |
744 | + <field name="priority">0</field> |
745 | <field name="project_id" ref="project.project_project_1"/> |
746 | <field name="name">Budget Planning</field> |
747 | <field name="date_deadline" eval="time.strftime('%Y-%m-24')"/> |
748 | @@ -140,7 +140,7 @@ |
749 | <field name="planned_hours" eval="60.0"/> |
750 | <field name="remaining_hours" eval="60.0"/> |
751 | <field name="user_id" ref="base.user_demo"/> |
752 | - <field name="priority">4</field> |
753 | + <field name="priority">0</field> |
754 | <field name="project_id" ref="project.project_project_1"/> |
755 | <field name="name">Develop module for Sale Management</field> |
756 | <field name="description">Use the account_budget module</field> |
757 | |
758 | === modified file 'project/project_view.xml' |
759 | --- project/project_view.xml 2014-04-15 12:14:04 +0000 |
760 | +++ project/project_view.xml 2014-05-08 15:35:32 +0000 |
761 | @@ -377,12 +377,11 @@ |
762 | options="{'fold_field': 'fold'}"/> |
763 | </header> |
764 | <sheet string="Task"> |
765 | + <div class="oe_right"> |
766 | + <field name="kanban_state" class="oe_inline" widget="kanban_state_selection"/> |
767 | + </div> |
768 | <h1> |
769 | <field name="name" placeholder="Task summary..." class="oe_inline"/> |
770 | - <field name="kanban_state" invisible='1'/> |
771 | - <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"/> |
772 | - <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"/> |
773 | - <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"/> |
774 | </h1> |
775 | <group> |
776 | <group> |
777 | @@ -444,7 +443,7 @@ |
778 | </page> |
779 | <page string="Extra Info"> |
780 | <group col="4"> |
781 | - <field name="priority" groups="base.group_user"/> |
782 | + <field name="priority" groups="base.group_user" widget="priority"/> |
783 | <field name="sequence"/> |
784 | <field name="partner_id"/> |
785 | <field name="company_id" groups="base.group_multi_company" widget="selection"/> |
786 | @@ -515,16 +514,6 @@ |
787 | <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> |
788 | <span t-attf-class="#{red || ''}"><i><field name="date_deadline"/></i></span> |
789 | </div> |
790 | - <div class="oe_kanban_bottom_right"> |
791 | - <t groups="base.group_user"> |
792 | - <a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a> |
793 | - <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> |
794 | - <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> |
795 | - <a t-if="record.priority.raw_value > 0" type="object" string="Normal" name="set_high_priority" class="oe_e oe_star_off">7</a> |
796 | - <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> |
797 | - </t> |
798 | - <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"/> |
799 | - </div> |
800 | <div class="oe_kanban_footer_left"> |
801 | <span groups="project.group_time_work_estimation_tasks" title="Remaining hours"> |
802 | <span class="oe_e">N</span> |
803 | @@ -535,6 +524,13 @@ |
804 | <t t-raw="record.message_summary.raw_value"/> |
805 | <field name="categ_ids"/> |
806 | </div> |
807 | + <div class="oe_kanban_bottom_right"> |
808 | + <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/> |
809 | + <div class="pull-left" groups="base.group_user"> |
810 | + <field name="kanban_state" widget="kanban_state_selection"/> |
811 | + <field name="priority" widget="priority"/> |
812 | + </div> |
813 | + </div> |
814 | </div> |
815 | <div class="oe_clear"></div> |
816 | </div> |
817 | |
818 | === modified file 'project/report/project_report.py' |
819 | --- project/report/project_report.py 2014-01-29 15:24:40 +0000 |
820 | +++ project/report/project_report.py 2014-05-08 15:35:32 +0000 |
821 | @@ -48,7 +48,7 @@ |
822 | help="Number of Days to Open the task"), |
823 | 'delay_endings_days': fields.float('Overpassed Deadline', digits=(16,2), readonly=True), |
824 | 'nbr': fields.integer('# of tasks', readonly=True), |
825 | - 'priority': fields.selection([('4', 'Very Low'), ('3', 'Low'), ('2', 'Medium'), ('1', 'Urgent'), ('0', 'Very urgent')], |
826 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], |
827 | string='Priority', readonly=True), |
828 | 'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')],'Status', readonly=True), |
829 | 'company_id': fields.many2one('res.company', 'Company', readonly=True), |
830 | |
831 | === modified file 'project_issue/project_issue.py' |
832 | --- project_issue/project_issue.py 2014-05-07 13:29:49 +0000 |
833 | +++ project_issue/project_issue.py 2014-05-08 15:35:32 +0000 |
834 | @@ -57,6 +57,7 @@ |
835 | }, |
836 | 'kanban_state': { |
837 | 'project_issue.mt_issue_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked', |
838 | + 'project_issue.mt_issue_ready': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'done', |
839 | }, |
840 | } |
841 | |
842 | @@ -250,7 +251,7 @@ |
843 | " * Normal is the default situation\n" |
844 | " * Blocked indicates something is preventing the progress of this issue\n" |
845 | " * Ready for next stage indicates the issue is ready to be pulled to the next stage", |
846 | - readonly=True, required=False), |
847 | + required=False), |
848 | 'email_from': fields.char('Email', size=128, help="These people will receive email.", select=1), |
849 | '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"), |
850 | 'date_open': fields.datetime('Opened', readonly=True,select=True), |
851 | @@ -260,7 +261,7 @@ |
852 | 'date_last_stage_update': fields.datetime('Last Stage Update', select=True), |
853 | 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."), |
854 | 'categ_ids': fields.many2many('project.category', string='Tags'), |
855 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True), |
856 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority', select=True), |
857 | 'version_id': fields.many2one('project.issue.version', 'Version'), |
858 | 'stage_id': fields.many2one ('project.task.type', 'Stage', |
859 | track_visibility='onchange', select=True, |
860 | @@ -295,7 +296,7 @@ |
861 | 'active': 1, |
862 | 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c), |
863 | 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c), |
864 | - 'priority': crm.AVAILABLE_PRIORITIES[2][0], |
865 | + 'priority': '1', |
866 | 'kanban_state': 'normal', |
867 | 'date_last_stage_update': fields.datetime.now, |
868 | 'user_id': lambda obj, cr, uid, context: uid, |
869 | @@ -305,19 +306,6 @@ |
870 | 'stage_id': _read_group_stage_ids |
871 | } |
872 | |
873 | - def set_priority(self, cr, uid, ids, priority, *args): |
874 | - return self.write(cr, uid, ids, {'priority' : priority}) |
875 | - |
876 | - def set_high_priority(self, cr, uid, ids, *args): |
877 | - """Set lead priority to high |
878 | - """ |
879 | - return self.set_priority(cr, uid, ids, '1') |
880 | - |
881 | - def set_normal_priority(self, cr, uid, ids, *args): |
882 | - """Set lead priority to normal |
883 | - """ |
884 | - return self.set_priority(cr, uid, ids, '3') |
885 | - |
886 | def copy(self, cr, uid, id, default=None, context=None): |
887 | issue = self.read(cr, uid, id, ['name'], context=context) |
888 | if not default: |
889 | @@ -375,15 +363,6 @@ |
890 | # Stage management |
891 | # ------------------------------------------------------- |
892 | |
893 | - def set_kanban_state_blocked(self, cr, uid, ids, context=None): |
894 | - return self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context) |
895 | - |
896 | - def set_kanban_state_normal(self, cr, uid, ids, context=None): |
897 | - return self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context) |
898 | - |
899 | - def set_kanban_state_done(self, cr, uid, ids, context=None): |
900 | - return self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context) |
901 | - |
902 | def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None): |
903 | """ Override of the base.stage method |
904 | Parameter of the stage search taken from the issue: |
905 | |
906 | === modified file 'project_issue/project_issue_data.xml' |
907 | --- project_issue/project_issue_data.xml 2014-02-21 11:27:04 +0000 |
908 | +++ project_issue/project_issue_data.xml 2014-05-08 15:35:32 +0000 |
909 | @@ -48,6 +48,12 @@ |
910 | <field name="default" eval="False"/> |
911 | <field name="description">Issue blocked</field> |
912 | </record> |
913 | + <record id="mt_issue_ready" model="mail.message.subtype"> |
914 | + <field name="name">Issue Ready for Next Stage</field> |
915 | + <field name="res_model">project.issue</field> |
916 | + <field name="default" eval="False"/> |
917 | + <field name="description">Issue Ready for Next Stage</field> |
918 | + </record> |
919 | <record id="mt_issue_stage" model="mail.message.subtype"> |
920 | <field name="name">Stage Changed</field> |
921 | <field name="res_model">project.issue</field> |
922 | |
923 | === modified file 'project_issue/project_issue_demo.xml' |
924 | --- project_issue/project_issue_demo.xml 2012-11-29 22:26:45 +0000 |
925 | +++ project_issue/project_issue_demo.xml 2014-05-08 15:35:32 +0000 |
926 | @@ -35,7 +35,7 @@ |
927 | <!-- Issues --> |
928 | <record id="crm_case_buginaccountsmodule0" model="project.issue"> |
929 | <field eval="time.strftime('%Y-%m-08 10:15:00')" name="date"/> |
930 | - <field name="priority">5</field> |
931 | + <field name="priority">0</field> |
932 | <field name="user_id" ref="base.user_root"/> |
933 | <field name="partner_id" ref="base.res_partner_2"/> |
934 | <field name="section_id" ref="crm.section_sales_department"/> |
935 | @@ -51,7 +51,7 @@ |
936 | |
937 | <record id="crm_case_programnotgivingproperoutput0" model="project.issue"> |
938 | <field eval="time.strftime('%Y-%m-15 12:50:00')" name="date"/> |
939 | - <field name="priority">3</field> |
940 | + <field name="priority">1</field> |
941 | <field name="user_id" ref="base.user_root"/> |
942 | <field name="partner_id" ref="base.res_partner_1"/> |
943 | <field name="section_id" ref="crm.section_sales_department"/> |
944 | @@ -64,7 +64,7 @@ |
945 | |
946 | <record id="crm_case_outputincorrect0" model="project.issue"> |
947 | <field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/> |
948 | - <field name="priority">4</field> |
949 | + <field name="priority">0</field> |
950 | <field name="user_id" ref="base.user_demo"/> |
951 | <field name="section_id" ref="crm.section_sales_department"/> |
952 | <field eval="1" name="active"/> |
953 | @@ -79,7 +79,7 @@ |
954 | |
955 | <record id="crm_case_problemloadingpage0" model="project.issue"> |
956 | <field eval="time.strftime('%Y-%m-20 15:25:05')" name="date"/> |
957 | - <field name="priority">3</field> |
958 | + <field name="priority">1</field> |
959 | <field name="user_id" ref="base.user_root"/> |
960 | <field name="partner_id" ref="base.res_partner_14"/> |
961 | <field name="section_id" ref="crm.section_sales_department"/> |
962 | @@ -92,7 +92,7 @@ |
963 | |
964 | <record id="crm_case_pagenotfound0" model="project.issue"> |
965 | <field eval="time.strftime('%Y-%m-22 18:15:00')" name="date"/> |
966 | - <field name="priority">3</field> |
967 | + <field name="priority">1</field> |
968 | <field name="user_id" ref="base.user_root"/> |
969 | <field name="partner_id" ref="base.res_partner_13"/> |
970 | <field name="section_id" ref="crm.section_sales_department"/> |
971 | @@ -105,7 +105,7 @@ |
972 | |
973 | <record id="crm_case_programmingerror0" model="project.issue"> |
974 | <field eval="time.strftime('%Y-%m-24 09:45:00')" name="date"/> |
975 | - <field name="priority">3</field> |
976 | + <field name="priority">1</field> |
977 | <field name="user_id" ref="base.user_root"/> |
978 | <field name="partner_id" ref="base.res_partner_5"/> |
979 | <field name="section_id" ref="crm.section_sales_department"/> |
980 | @@ -172,7 +172,7 @@ |
981 | |
982 | <record id="crm_case_newfeaturestobeadded0" model="project.issue"> |
983 | <field eval="time.strftime('%Y-%m-01 12:15:10')" name="date"/> |
984 | - <field name="priority">4</field> |
985 | + <field name="priority">0</field> |
986 | <field name="user_id" ref="base.user_root"/> |
987 | <field name="partner_id" ref="base.res_partner_8"/> |
988 | <field name="section_id" ref="crm.section_sales_department"/> |
989 | @@ -199,7 +199,7 @@ |
990 | |
991 | <record id="crm_case_includeattendancesheetinproject0" model="project.issue"> |
992 | <field eval="time.strftime('%Y-%m-10 17:05:30')" name="date"/> |
993 | - <field name="priority">3</field> |
994 | + <field name="priority">1</field> |
995 | <field name="user_id" ref="base.user_root"/> |
996 | <field name="partner_id" ref="base.res_partner_10"/> |
997 | <field name="section_id" ref="crm.section_sales_department"/> |
998 | @@ -213,7 +213,7 @@ |
999 | |
1000 | <record id="crm_case_createnewobject0" model="project.issue"> |
1001 | <field eval="time.strftime('%Y-%m-15 10:35:15')" name="date"/> |
1002 | - <field name="priority">3</field> |
1003 | + <field name="priority">1</field> |
1004 | <field name="user_id" ref="base.user_root"/> |
1005 | <field name="partner_id" ref="base.res_partner_6"/> |
1006 | <field name="section_id" ref="crm.section_sales_department"/> |
1007 | @@ -226,7 +226,7 @@ |
1008 | |
1009 | <record id="crm_case_improvereportsinhrms0" model="project.issue"> |
1010 | <field eval="time.strftime('%Y-%m-19 12:15:00')" name="date"/> |
1011 | - <field name="priority">4</field> |
1012 | + <field name="priority">0</field> |
1013 | <field name="user_id" ref="base.user_root"/> |
1014 | <field name="partner_id" ref="base.res_partner_11"/> |
1015 | <field name="section_id" ref="crm.section_sales_department"/> |
1016 | |
1017 | === modified file 'project_issue/project_issue_view.xml' |
1018 | --- project_issue/project_issue_view.xml 2014-05-02 13:07:53 +0000 |
1019 | +++ project_issue/project_issue_view.xml 2014-05-08 15:35:32 +0000 |
1020 | @@ -52,13 +52,12 @@ |
1021 | options="{'fold_field': 'fold'}"/> |
1022 | </header> |
1023 | <sheet string="Issue"> |
1024 | + <div class="oe_right"> |
1025 | + <field name="kanban_state" class="oe_inline" widget="kanban_state_selection"/> |
1026 | + </div> |
1027 | <label for="name" class="oe_edit_only"/> |
1028 | <h1> |
1029 | <field name="name" class="oe_inline"/> |
1030 | - <field name="kanban_state" invisible='1'/> |
1031 | - <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"/> |
1032 | - <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"/> |
1033 | - <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"/> |
1034 | </h1> |
1035 | <label for="categ_ids" class="oe_edit_only"/> |
1036 | <field name="categ_ids" widget="many2many_tags"/> |
1037 | @@ -78,7 +77,7 @@ |
1038 | <group> |
1039 | <field name="id"/> |
1040 | <field name="version_id" groups="base.group_user"/> |
1041 | - <field name="priority" groups="base.group_user"/> |
1042 | + <field name="priority" groups="base.group_user" widget="priority"/> |
1043 | <label for="task_id" groups="base.group_user"/> |
1044 | <div groups="base.group_user"> |
1045 | <field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/> |
1046 | @@ -217,34 +216,15 @@ |
1047 | <field name="partner_id"/> <br/> |
1048 | <field name="version_id"/> |
1049 | </div> |
1050 | + <div class="oe_kanban_bottom_right"> |
1051 | + <img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/> |
1052 | + <div class="pull-left" groups="base.group_user"> |
1053 | + <field name="kanban_state" widget="kanban_state_selection"/> |
1054 | + <field name="priority" widget="priority"/> |
1055 | + </div> |
1056 | + </div> |
1057 | <div class="oe_kanban_footer_left"> |
1058 | <field name="categ_ids"/> |
1059 | - <div class="oe_right"> |
1060 | - <span class="oe_kanban_highlight" groups="base.group_user"> |
1061 | - <a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a> |
1062 | - <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> |
1063 | - <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> |
1064 | - <t t-set="priority" t-value="record.priority.raw_value || 5"/> |
1065 | - <a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority"> |
1066 | - <img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/> |
1067 | - </a> |
1068 | - <a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority"> |
1069 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/> |
1070 | - </a> |
1071 | - <a type="object" name="set_priority" args="['2']" title="High Priority"> |
1072 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/> |
1073 | - </a> |
1074 | - <a type="object" name="set_priority" args="['1']" title="Highest Priority"> |
1075 | - <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/> |
1076 | - </a> |
1077 | - </span> |
1078 | - <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())"> |
1079 | - <span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span> |
1080 | - </t> |
1081 | - <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"/> |
1082 | - </div> |
1083 | - </div> |
1084 | - <div class="oe_kanban_footer_left"> |
1085 | <t t-raw="record.message_summary.raw_value"/> |
1086 | </div> |
1087 | </div> |
1088 | |
1089 | === modified file 'project_issue/report/project_issue_report.py' |
1090 | --- project_issue/report/project_issue_report.py 2013-10-27 12:31:04 +0000 |
1091 | +++ project_issue/report/project_issue_report.py 2014-05-08 15:35:32 +0000 |
1092 | @@ -47,7 +47,7 @@ |
1093 | 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg", |
1094 | help="Number of Days to close the project issue"), |
1095 | 'company_id' : fields.many2one('res.company', 'Company'), |
1096 | - 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), |
1097 | + 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'), |
1098 | 'project_id':fields.many2one('project.project', 'Project',readonly=True), |
1099 | 'version_id': fields.many2one('project.issue.version', 'Version'), |
1100 | 'user_id' : fields.many2one('res.users', 'Assigned to',readonly=True), |