Merge lp:~vauxoo/addons-vauxoo/7.0-improvements_hu_task_1184-dev-yani into lp:addons-vauxoo/7.0
- 7.0-improvements_hu_task_1184-dev-yani
- Merge into 7.0
Proposed by
Yanina Aular (Vauxoo)
Status: | Merged |
---|---|
Merged at revision: | 994 |
Proposed branch: | lp:~vauxoo/addons-vauxoo/7.0-improvements_hu_task_1184-dev-yani |
Merge into: | lp:addons-vauxoo/7.0 |
Diff against target: |
1316 lines (+1074/-139) 6 files modified
user_story/__openerp__.py (+1/-0) user_story/data/user_story_template.xml (+957/-21) user_story/model/user_story.py (+115/-0) user_story/view/userstory_view.xml (+0/-2) user_story_long_term/__openerp__.py (+1/-1) user_story_long_term/user_story_long_term.py (+0/-115) |
To merge this branch: | bzr merge lp:~vauxoo/addons-vauxoo/7.0-improvements_hu_task_1184-dev-yani |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gabriela Quilarque | Approve | ||
Review via email:
|
Commit message
Description of the change
1.- El código que escribe en el log cuando se acepta un criterio, y el código que envia un email cuando la hu pasa de estado, debe ir en el módulo user.story en el modelo user.story. No en el módulo user_story_
2.- Cuando se envia un email debido a que cambia de estado la hu a pending, este debe contener una plantilla, como lo escribí en la tarea, es tal cual como cuando se cambia al estado backlog la tarea.
3.- En la vista en Tree de criterios de aceptación por favor eliminar los campos development y difficulty.
To post a comment you must log in.
- 998. By Yanina Aular (Vauxoo)
-
[IMP] update template xml
- 999. By Yanina Aular (Vauxoo)
-
[FIX]
- 1000. By Yanina Aular (Vauxoo)
-
[IMP] in color font and redaction
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gabriela Quilarque (gabrielaquilarque97) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'user_story/__openerp__.py' |
2 | --- user_story/__openerp__.py 2014-02-28 03:29:36 +0000 |
3 | +++ user_story/__openerp__.py 2014-03-26 20:24:07 +0000 |
4 | @@ -61,6 +61,7 @@ |
5 | "view/userstory_view.xml", |
6 | "view/project_view.xml", |
7 | "data/data.xml", |
8 | + "data/user_story_template.xml", |
9 | ], |
10 | "active": False, |
11 | "images": [], |
12 | |
13 | === renamed file 'user_story_long_term/data/user_story_template.xml' => 'user_story/data/user_story_template.xml' |
14 | --- user_story_long_term/data/user_story_template.xml 2014-03-25 15:15:07 +0000 |
15 | +++ user_story/data/user_story_template.xml 2014-03-26 20:24:07 +0000 |
16 | @@ -1,12 +1,12 @@ |
17 | <?xml version="1.0"?> |
18 | <openerp> |
19 | - <data noupdate="1"> |
20 | + <data noupdate="0"> |
21 | <!-- |
22 | ===================================================== |
23 | SEND EMAIL TEMPLATE |
24 | ===================================================== |
25 | --> |
26 | - <record id="template_send_email_hu" model="email.template"> |
27 | + <record id="template_send_email_hu" model="email.template" forcecreate="True"> |
28 | <field name="name">Accept Criteria</field> |
29 | <field name="email_from"></field> |
30 | <field name="model_id" ref="user_story.model_user_story" /> |
31 | @@ -19,20 +19,482 @@ |
32 | <field name="email_to"></field> |
33 | <field name="sequence">5</field> |
34 | <field name="body_html"><![CDATA[ |
35 | - <html> |
36 | - <head> |
37 | - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
38 | - <title>*|MC:SUBJECT|*</title> |
39 | - </head> |
40 | - <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> |
41 | - In the User Story "NAME_HU", the "NAME_CRI" criteria has been accepted by NAME_USER. |
42 | - </body> |
43 | - </html> |
44 | - |
45 | +<html> |
46 | + <head> |
47 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
48 | + <title>*|MC:SUBJECT|*</title> |
49 | + <style type="text/css"> |
50 | + /* Client-specific Styles */ |
51 | + #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */ |
52 | + body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */ |
53 | + body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */ |
54 | + |
55 | + /* Reset Styles */ |
56 | + body{margin:0; padding:0;} |
57 | + img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;} |
58 | + table td{border-collapse:collapse;} |
59 | + #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;} |
60 | + |
61 | + /* Template Styles */ |
62 | + |
63 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: COMMON PAGE ELEMENTS /\/\/\/\/\/\/\/\/\/\ */ |
64 | + |
65 | + /** |
66 | + * @tab Page |
67 | + * @section background color |
68 | + * @tip Set the background color for your email. You may want to choose one that matches your company's branding. |
69 | + * @theme page |
70 | + */ |
71 | + body, #backgroundTable{ |
72 | + /*@editable*/ background-color:#FAFAFA; |
73 | + } |
74 | + |
75 | + /** |
76 | + * @tab Page |
77 | + * @section email border |
78 | + * @tip Set the border for your email. |
79 | + */ |
80 | + #templateContainer{ |
81 | + /*@editable*/ border:0; |
82 | + } |
83 | + |
84 | + /** |
85 | + * @tab Page |
86 | + * @section heading 1 |
87 | + * @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings. |
88 | + * @style heading 1 |
89 | + */ |
90 | + h1, .h1{ |
91 | + /*@editable*/ color:#202020; |
92 | + display:block; |
93 | + /*@editable*/ font-family:Arial; |
94 | + /*@editable*/ font-size:40px; |
95 | + /*@editable*/ font-weight:bold; |
96 | + /*@editable*/ line-height:100%; |
97 | + margin-top:2%; |
98 | + margin-right:0; |
99 | + margin-bottom:1%; |
100 | + margin-left:0; |
101 | + /*@editable*/ text-align:left; |
102 | + } |
103 | + |
104 | + /** |
105 | + * @tab Page |
106 | + * @section heading 2 |
107 | + * @tip Set the styling for all second-level headings in your emails. |
108 | + * @style heading 2 |
109 | + */ |
110 | + h2, .h2{ |
111 | + /*@editable*/ color:#404040; |
112 | + display:block; |
113 | + /*@editable*/ font-family:Arial; |
114 | + /*@editable*/ font-size:18px; |
115 | + /*@editable*/ font-weight:bold; |
116 | + /*@editable*/ line-height:100%; |
117 | + margin-top:2%; |
118 | + margin-right:0; |
119 | + margin-bottom:1%; |
120 | + margin-left:0; |
121 | + /*@editable*/ text-align:left; |
122 | + } |
123 | + |
124 | + /** |
125 | + * @tab Page |
126 | + * @section heading 3 |
127 | + * @tip Set the styling for all third-level headings in your emails. |
128 | + * @style heading 3 |
129 | + */ |
130 | + h3, .h3{ |
131 | + /*@editable*/ color:#606060; |
132 | + display:block; |
133 | + /*@editable*/ font-family:Arial; |
134 | + /*@editable*/ font-size:16px; |
135 | + /*@editable*/ font-weight:bold; |
136 | + /*@editable*/ line-height:100%; |
137 | + margin-top:2%; |
138 | + margin-right:0; |
139 | + margin-bottom:1%; |
140 | + margin-left:0; |
141 | + /*@editable*/ text-align:left; |
142 | + } |
143 | + |
144 | + /** |
145 | + * @tab Page |
146 | + * @section heading 4 |
147 | + * @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings. |
148 | + * @style heading 4 |
149 | + */ |
150 | + h4, .h4{ |
151 | + /*@editable*/ color:#808080; |
152 | + display:block; |
153 | + /*@editable*/ font-family:Arial; |
154 | + /*@editable*/ font-size:14px; |
155 | + /*@editable*/ font-weight:bold; |
156 | + /*@editable*/ line-height:100%; |
157 | + margin-top:2%; |
158 | + margin-right:0; |
159 | + margin-bottom:1%; |
160 | + margin-left:0; |
161 | + /*@editable*/ text-align:left; |
162 | + } |
163 | + |
164 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: PREHEADER /\/\/\/\/\/\/\/\/\/\ */ |
165 | + |
166 | + /** |
167 | + * @tab Header |
168 | + * @section preheader style |
169 | + * @tip Set the background color for your email's preheader area. |
170 | + * @theme page |
171 | + */ |
172 | + #templatePreheader{ |
173 | + /*@editable*/ background-color:#FAFAFA; |
174 | + } |
175 | + |
176 | + /** |
177 | + * @tab Header |
178 | + * @section preheader text |
179 | + * @tip Set the styling for your email's preheader text. Choose a size and color that is easy to read. |
180 | + */ |
181 | + .preheaderContent div{ |
182 | + /*@editable*/ color:#707070; |
183 | + /*@editable*/ font-family:Arial; |
184 | + /*@editable*/ font-size:10px; |
185 | + /*@editable*/ line-height:100%; |
186 | + /*@editable*/ text-align:left; |
187 | + } |
188 | + |
189 | + /** |
190 | + * @tab Header |
191 | + * @section preheader link |
192 | + * @tip Set the styling for your email's preheader links. Choose a color that helps them stand out from your text. |
193 | + */ |
194 | + .preheaderContent div a:link, .preheaderContent div a:visited, /* Yahoo! Mail Override */ .preheaderContent div a .yshortcuts /* Yahoo! Mail Override */{ |
195 | + /*@editable*/ color:#336699; |
196 | + /*@editable*/ font-weight:normal; |
197 | + /*@editable*/ text-decoration:underline; |
198 | + } |
199 | + |
200 | + /** |
201 | + * @tab Header |
202 | + * @section social bar style |
203 | + * @tip Set the background color and border for your email's footer social bar. |
204 | + */ |
205 | + #social div{ |
206 | + /*@editable*/ text-align:right; |
207 | + } |
208 | + |
209 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: HEADER /\/\/\/\/\/\/\/\/\/\ */ |
210 | + |
211 | + /** |
212 | + * @tab Header |
213 | + * @section header style |
214 | + * @tip Set the background color and border for your email's header area. |
215 | + * @theme header |
216 | + */ |
217 | + #templateHeader{ |
218 | + /*@editable*/ background-color:#FFFFFF; |
219 | + /*@editable*/ border-bottom:5px solid #505050; |
220 | + } |
221 | + |
222 | + /** |
223 | + * @tab Header |
224 | + * @section header text |
225 | + * @tip Set the styling for your email's header text. Choose a size and color that is easy to read. |
226 | + */ |
227 | + .headerContent{ |
228 | + /*@editable*/ color:#202020; |
229 | + /*@editable*/ font-family:Arial; |
230 | + /*@editable*/ font-size:34px; |
231 | + /*@editable*/ font-weight:bold; |
232 | + /*@editable*/ line-height:100%; |
233 | + /*@editable*/ padding:10px; |
234 | + /*@editable*/ text-align:right; |
235 | + /*@editable*/ vertical-align:middle; |
236 | + } |
237 | + |
238 | + /** |
239 | + * @tab Header |
240 | + * @section header link |
241 | + * @tip Set the styling for your email's header links. Choose a color that helps them stand out from your text. |
242 | + */ |
243 | + .headerContent a:link, .headerContent a:visited, /* Yahoo! Mail Override */ .headerContent a .yshortcuts /* Yahoo! Mail Override */{ |
244 | + /*@editable*/ color:#336699; |
245 | + /*@editable*/ font-weight:normal; |
246 | + /*@editable*/ text-decoration:underline; |
247 | + } |
248 | + |
249 | + #headerImage{ |
250 | + height:auto; |
251 | + max-width:600px !important; |
252 | + } |
253 | + |
254 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: MAIN BODY /\/\/\/\/\/\/\/\/\/\ */ |
255 | + |
256 | + /** |
257 | + * @tab Body |
258 | + * @section body style |
259 | + * @tip Set the background color for your email's body area. |
260 | + */ |
261 | + #templateContainer, .bodyContent{ |
262 | + /*@editable*/ background-color:#FDFDFD; |
263 | + } |
264 | + |
265 | + /** |
266 | + * @tab Body |
267 | + * @section body text |
268 | + * @tip Set the styling for your email's main content text. Choose a size and color that is easy to read. |
269 | + * @theme main |
270 | + */ |
271 | + .bodyContent div{ |
272 | + /*@editable*/ color:#505050; |
273 | + /*@editable*/ font-family:Arial; |
274 | + /*@editable*/ font-size:14px; |
275 | + /*@editable*/ line-height:150%; |
276 | + /*@editable*/ text-align:justify; |
277 | + } |
278 | + |
279 | + /** |
280 | + * @tab Body |
281 | + * @section body link |
282 | + * @tip Set the styling for your email's main content links. Choose a color that helps them stand out from your text. |
283 | + */ |
284 | + .bodyContent div a:link, .bodyContent div a:visited, /* Yahoo! Mail Override */ .bodyContent div a .yshortcuts /* Yahoo! Mail Override */{ |
285 | + /*@editable*/ color:#336699; |
286 | + /*@editable*/ font-weight:normal; |
287 | + /*@editable*/ text-decoration:underline; |
288 | + } |
289 | + |
290 | + .bodyContent img{ |
291 | + display:inline; |
292 | + height:auto; |
293 | + } |
294 | + |
295 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: SIDEBAR /\/\/\/\/\/\/\/\/\/\ */ |
296 | + |
297 | + /** |
298 | + * @tab Sidebar |
299 | + * @section sidebar style |
300 | + * @tip Set the background color and border for your email's sidebar area. |
301 | + */ |
302 | + #templateSidebar{ |
303 | + /*@editable*/ background-color:#FDFDFD; |
304 | + } |
305 | + |
306 | + /** |
307 | + * @tab Sidebar |
308 | + * @section sidebar style |
309 | + * @tip Set the background color and border for your email's sidebar area. |
310 | + */ |
311 | + .sidebarContent{ |
312 | + /*@editable*/ border-right:1px solid #DDDDDD; |
313 | + } |
314 | + |
315 | + /** |
316 | + * @tab Sidebar |
317 | + * @section sidebar text |
318 | + * @tip Set the styling for your email's sidebar text. Choose a size and color that is easy to read. |
319 | + */ |
320 | + .sidebarContent div{ |
321 | + /*@editable*/ color:#505050; |
322 | + /*@editable*/ font-family:Arial; |
323 | + /*@editable*/ font-size:10px; |
324 | + /*@editable*/ line-height:150%; |
325 | + /*@editable*/ text-align:left; |
326 | + } |
327 | + |
328 | + /** |
329 | + * @tab Sidebar |
330 | + * @section sidebar link |
331 | + * @tip Set the styling for your email's sidebar links. Choose a color that helps them stand out from your text. |
332 | + */ |
333 | + .sidebarContent div a:link, .sidebarContent div a:visited, /* Yahoo! Mail Override */ .sidebarContent div a .yshortcuts /* Yahoo! Mail Override */{ |
334 | + /*@editable*/ color:#336699; |
335 | + /*@editable*/ font-weight:normal; |
336 | + /*@editable*/ text-decoration:underline; |
337 | + } |
338 | + |
339 | + .sidebarContent img{ |
340 | + display:inline; |
341 | + height:auto; |
342 | + } |
343 | + |
344 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: FOOTER /\/\/\/\/\/\/\/\/\/\ */ |
345 | + |
346 | + /** |
347 | + * @tab Footer |
348 | + * @section footer style |
349 | + * @tip Set the background color and top border for your email's footer area. |
350 | + * @theme footer |
351 | + */ |
352 | + #templateFooter{ |
353 | + /*@editable*/ background-color:#FAFAFA; |
354 | + /*@editable*/ border-top:3px solid #909090; |
355 | + } |
356 | + |
357 | + /** |
358 | + * @tab Footer |
359 | + * @section footer text |
360 | + * @tip Set the styling for your email's footer text. Choose a size and color that is easy to read. |
361 | + * @theme footer |
362 | + */ |
363 | + .footerContent div{ |
364 | + /*@editable*/ color:#707070; |
365 | + /*@editable*/ font-family:Arial; |
366 | + /*@editable*/ font-size:11px; |
367 | + /*@editable*/ line-height:125%; |
368 | + /*@editable*/ text-align:left; |
369 | + } |
370 | + |
371 | + /** |
372 | + * @tab Footer |
373 | + * @section footer link |
374 | + * @tip Set the styling for your email's footer links. Choose a color that helps them stand out from your text. |
375 | + */ |
376 | + .footerContent div a:link, .footerContent div a:visited, /* Yahoo! Mail Override */ .footerContent div a .yshortcuts /* Yahoo! Mail Override */{ |
377 | + /*@editable*/ color:#336699; |
378 | + /*@editable*/ font-weight:normal; |
379 | + /*@editable*/ text-decoration:underline; |
380 | + } |
381 | + |
382 | + .footerContent img{ |
383 | + display:inline; |
384 | + } |
385 | + |
386 | + /** |
387 | + * @tab Footer |
388 | + * @section social bar style |
389 | + * @tip Set the background color and border for your email's footer social bar. |
390 | + * @theme footer |
391 | + */ |
392 | + #social{ |
393 | + /*@editable*/ background-color:#FFFFFF; |
394 | + /*@editable*/ border:0; |
395 | + } |
396 | + |
397 | + /** |
398 | + * @tab Footer |
399 | + * @section social bar style |
400 | + * @tip Set the background color and border for your email's footer social bar. |
401 | + */ |
402 | + #social div{ |
403 | + /*@editable*/ text-align:left; |
404 | + } |
405 | + |
406 | + /** |
407 | + * @tab Footer |
408 | + * @section utility bar style |
409 | + * @tip Set the background color and border for your email's footer utility bar. |
410 | + * @theme footer |
411 | + */ |
412 | + #utility{ |
413 | + /*@editable*/ background-color:#FAFAFA; |
414 | + /*@editable*/ border-top:0; |
415 | + } |
416 | + |
417 | + /** |
418 | + * @tab Footer |
419 | + * @section utility bar style |
420 | + * @tip Set the background color and border for your email's footer utility bar. |
421 | + */ |
422 | + #utility div{ |
423 | + /*@editable*/ text-align:left; |
424 | + } |
425 | + |
426 | + #monkeyRewards img{ |
427 | + max-width:170px !important; |
428 | + } |
429 | + </style> |
430 | + </head> |
431 | + <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> |
432 | + <center> |
433 | + <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable"> |
434 | + <tr> |
435 | + <td align="center" valign="top"> |
436 | + <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateContainer"> |
437 | + <tr style="margin: 0px; padding: 0px; background-color: rgb(247, 247, 247);"> |
438 | + <td align="center" valign="top"> |
439 | + <!-- // Begin Template Header \\ --> |
440 | + <table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin: 0px; padding: 0px; background-color: rgb(253, 253, 253);"> |
441 | + <tr> |
442 | + <td class="headerContent"> |
443 | + <img src="https://pbs.twimg.com/profile_images/2137139487/logo-vauxoo-lp.jpg" style="max-width:60px; padding: 2px 2px 2px;" id="headerImage campaign-icon" mc:label="header_image" mc:edit="header_image" mc:allowtext /> |
444 | + </td> |
445 | + |
446 | + <td class="headerContent" width="100%" style="padding-left:10px; padding-right:20px;"> |
447 | + <div mc:edit="Header_content"> |
448 | + <h2> |
449 | + NAME_HU |
450 | + </h2> |
451 | + </div> |
452 | + </td> |
453 | + </tr> |
454 | + </table> |
455 | + <!-- // End Template Header \\ --> |
456 | + </td> |
457 | + </tr> |
458 | + <tr> |
459 | + <td align="center" style="margin: 0px; padding: 0px; width: 600px; background-color: #951510"> |
460 | + <div style="font-size:1.3em; font-family:Arial; color:#FFFFFF;"><b> |
461 | + Criterio de Aceptación. |
462 | + </b></div> |
463 | + </td> |
464 | + </tr> |
465 | + <tr> |
466 | + <td align="center" valign="top"> |
467 | + <!-- // Begin Template Body \\ --> |
468 | + <table border="0" cellpadding="10" cellspacing="0" width="600" style="margin: 0px; padding: 0px; width: 600px; background-color: rgb(247, 247, 247);"> |
469 | + <tr> |
470 | + <!-- // Begin Sidebar \\ --> |
471 | + <td valign="top" width="180" id="templateSidebar"> |
472 | + <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
473 | + <tr> |
474 | + <td valign="top"> |
475 | + </td> |
476 | + </tr> |
477 | + </table> |
478 | + </td> |
479 | + <!-- // End Sidebar \\ --> |
480 | + <td valign="top" class="bodyContent"> |
481 | + |
482 | + <!-- // Begin Module: Standard Content \\ --> |
483 | + <table border="0" cellpadding="10" cellspacing="0" width="600"> |
484 | + <tr> |
485 | + <td valign="top" style="padding-left:0;"> |
486 | + <div mc:edit="std_content00"> |
487 | + <h2 class="h2">Estimad@ NAME_OWNER</h2> |
488 | + <h3 class="h3"> |
489 | + El criterio de aceptación "NAME_CRI" ha sido aceptado por NAME_USER. |
490 | + </h3> |
491 | + <pre style="font-size:1.1em; font-family:Arial"> |
492 | + |
493 | +Agradeciendo su atención. |
494 | + |
495 | +Ante cualquier duda estamos a su disposición. |
496 | + </pre> |
497 | + <br /> |
498 | + </div> |
499 | + </td> |
500 | + </tr> |
501 | + </table> |
502 | + <!-- // End Module: Standard Content \\ --> |
503 | + |
504 | + </td> |
505 | + </tr> |
506 | + </table> |
507 | + <!-- // End Template Body \\ --> |
508 | + </td> |
509 | + </table> |
510 | + <br /> |
511 | + </td> |
512 | + </tr> |
513 | + </table> |
514 | + </center> |
515 | + </body> |
516 | +</html> |
517 | ]]></field> |
518 | </record> |
519 | |
520 | - <record id="template_send_email_hu_progress" model="email.template"> |
521 | + <record id="template_send_email_hu_progress" model="email.template" forcecreate="True"> |
522 | <field name="name">User Story in Progress</field> |
523 | <field name="email_from"></field> |
524 | <field name="model_id" ref="user_story.model_user_story" /> |
525 | @@ -42,14 +504,488 @@ |
526 | <field name="email_to"></field> |
527 | <field name="sequence">5</field> |
528 | <field name="body_html"><![CDATA[ |
529 | - <html> |
530 | - <head> |
531 | - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
532 | - </head> |
533 | - <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> |
534 | - Now the "NAME_HU" User Story is Pending, processed by NAME_USER. |
535 | - </body> |
536 | - </html> |
537 | +<html> |
538 | + <head> |
539 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
540 | + <title>*|MC:SUBJECT|*</title> |
541 | + <style type="text/css"> |
542 | + /* Client-specific Styles */ |
543 | + #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */ |
544 | + body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */ |
545 | + body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */ |
546 | + |
547 | + /* Reset Styles */ |
548 | + body{margin:0; padding:0;} |
549 | + img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;} |
550 | + table td{border-collapse:collapse;} |
551 | + #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;} |
552 | + |
553 | + /* Template Styles */ |
554 | + |
555 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: COMMON PAGE ELEMENTS /\/\/\/\/\/\/\/\/\/\ */ |
556 | + |
557 | + /** |
558 | + * @tab Page |
559 | + * @section background color |
560 | + * @tip Set the background color for your email. You may want to choose one that matches your company's branding. |
561 | + * @theme page |
562 | + */ |
563 | + body, #backgroundTable{ |
564 | + /*@editable*/ background-color:#FAFAFA; |
565 | + } |
566 | + |
567 | + /** |
568 | + * @tab Page |
569 | + * @section email border |
570 | + * @tip Set the border for your email. |
571 | + */ |
572 | + #templateContainer{ |
573 | + /*@editable*/ border:0; |
574 | + } |
575 | + |
576 | + /** |
577 | + * @tab Page |
578 | + * @section heading 1 |
579 | + * @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings. |
580 | + * @style heading 1 |
581 | + */ |
582 | + h1, .h1{ |
583 | + /*@editable*/ color:#202020; |
584 | + display:block; |
585 | + /*@editable*/ font-family:Arial; |
586 | + /*@editable*/ font-size:40px; |
587 | + /*@editable*/ font-weight:bold; |
588 | + /*@editable*/ line-height:100%; |
589 | + margin-top:2%; |
590 | + margin-right:0; |
591 | + margin-bottom:1%; |
592 | + margin-left:0; |
593 | + /*@editable*/ text-align:left; |
594 | + } |
595 | + |
596 | + /** |
597 | + * @tab Page |
598 | + * @section heading 2 |
599 | + * @tip Set the styling for all second-level headings in your emails. |
600 | + * @style heading 2 |
601 | + */ |
602 | + h2, .h2{ |
603 | + /*@editable*/ color:#404040; |
604 | + display:block; |
605 | + /*@editable*/ font-family:Arial; |
606 | + /*@editable*/ font-size:18px; |
607 | + /*@editable*/ font-weight:bold; |
608 | + /*@editable*/ line-height:100%; |
609 | + margin-top:2%; |
610 | + margin-right:0; |
611 | + margin-bottom:1%; |
612 | + margin-left:0; |
613 | + /*@editable*/ text-align:left; |
614 | + } |
615 | + |
616 | + /** |
617 | + * @tab Page |
618 | + * @section heading 3 |
619 | + * @tip Set the styling for all third-level headings in your emails. |
620 | + * @style heading 3 |
621 | + */ |
622 | + h3, .h3{ |
623 | + /*@editable*/ color:#606060; |
624 | + display:block; |
625 | + /*@editable*/ font-family:Arial; |
626 | + /*@editable*/ font-size:16px; |
627 | + /*@editable*/ font-weight:bold; |
628 | + /*@editable*/ line-height:100%; |
629 | + margin-top:2%; |
630 | + margin-right:0; |
631 | + margin-bottom:1%; |
632 | + margin-left:0; |
633 | + /*@editable*/ text-align:left; |
634 | + } |
635 | + |
636 | + /** |
637 | + * @tab Page |
638 | + * @section heading 4 |
639 | + * @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings. |
640 | + * @style heading 4 |
641 | + */ |
642 | + h4, .h4{ |
643 | + /*@editable*/ color:#808080; |
644 | + display:block; |
645 | + /*@editable*/ font-family:Arial; |
646 | + /*@editable*/ font-size:14px; |
647 | + /*@editable*/ font-weight:bold; |
648 | + /*@editable*/ line-height:100%; |
649 | + margin-top:2%; |
650 | + margin-right:0; |
651 | + margin-bottom:1%; |
652 | + margin-left:0; |
653 | + /*@editable*/ text-align:left; |
654 | + } |
655 | + |
656 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: PREHEADER /\/\/\/\/\/\/\/\/\/\ */ |
657 | + |
658 | + /** |
659 | + * @tab Header |
660 | + * @section preheader style |
661 | + * @tip Set the background color for your email's preheader area. |
662 | + * @theme page |
663 | + */ |
664 | + #templatePreheader{ |
665 | + /*@editable*/ background-color:#FAFAFA; |
666 | + } |
667 | + |
668 | + /** |
669 | + * @tab Header |
670 | + * @section preheader text |
671 | + * @tip Set the styling for your email's preheader text. Choose a size and color that is easy to read. |
672 | + */ |
673 | + .preheaderContent div{ |
674 | + /*@editable*/ color:#707070; |
675 | + /*@editable*/ font-family:Arial; |
676 | + /*@editable*/ font-size:10px; |
677 | + /*@editable*/ line-height:100%; |
678 | + /*@editable*/ text-align:left; |
679 | + } |
680 | + |
681 | + /** |
682 | + * @tab Header |
683 | + * @section preheader link |
684 | + * @tip Set the styling for your email's preheader links. Choose a color that helps them stand out from your text. |
685 | + */ |
686 | + .preheaderContent div a:link, .preheaderContent div a:visited, /* Yahoo! Mail Override */ .preheaderContent div a .yshortcuts /* Yahoo! Mail Override */{ |
687 | + /*@editable*/ color:#336699; |
688 | + /*@editable*/ font-weight:normal; |
689 | + /*@editable*/ text-decoration:underline; |
690 | + } |
691 | + |
692 | + /** |
693 | + * @tab Header |
694 | + * @section social bar style |
695 | + * @tip Set the background color and border for your email's footer social bar. |
696 | + */ |
697 | + #social div{ |
698 | + /*@editable*/ text-align:right; |
699 | + } |
700 | + |
701 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: HEADER /\/\/\/\/\/\/\/\/\/\ */ |
702 | + |
703 | + /** |
704 | + * @tab Header |
705 | + * @section header style |
706 | + * @tip Set the background color and border for your email's header area. |
707 | + * @theme header |
708 | + */ |
709 | + #templateHeader{ |
710 | + /*@editable*/ background-color:#FFFFFF; |
711 | + /*@editable*/ border-bottom:5px solid #505050; |
712 | + } |
713 | + |
714 | + /** |
715 | + * @tab Header |
716 | + * @section header text |
717 | + * @tip Set the styling for your email's header text. Choose a size and color that is easy to read. |
718 | + */ |
719 | + .headerContent{ |
720 | + /*@editable*/ color:#202020; |
721 | + /*@editable*/ font-family:Arial; |
722 | + /*@editable*/ font-size:34px; |
723 | + /*@editable*/ font-weight:bold; |
724 | + /*@editable*/ line-height:100%; |
725 | + /*@editable*/ padding:10px; |
726 | + /*@editable*/ text-align:right; |
727 | + /*@editable*/ vertical-align:middle; |
728 | + } |
729 | + |
730 | + /** |
731 | + * @tab Header |
732 | + * @section header link |
733 | + * @tip Set the styling for your email's header links. Choose a color that helps them stand out from your text. |
734 | + */ |
735 | + .headerContent a:link, .headerContent a:visited, /* Yahoo! Mail Override */ .headerContent a .yshortcuts /* Yahoo! Mail Override */{ |
736 | + /*@editable*/ color:#336699; |
737 | + /*@editable*/ font-weight:normal; |
738 | + /*@editable*/ text-decoration:underline; |
739 | + } |
740 | + |
741 | + #headerImage{ |
742 | + height:auto; |
743 | + max-width:600px !important; |
744 | + } |
745 | + |
746 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: MAIN BODY /\/\/\/\/\/\/\/\/\/\ */ |
747 | + |
748 | + /** |
749 | + * @tab Body |
750 | + * @section body style |
751 | + * @tip Set the background color for your email's body area. |
752 | + */ |
753 | + #templateContainer, .bodyContent{ |
754 | + /*@editable*/ background-color:#FDFDFD; |
755 | + } |
756 | + |
757 | + /** |
758 | + * @tab Body |
759 | + * @section body text |
760 | + * @tip Set the styling for your email's main content text. Choose a size and color that is easy to read. |
761 | + * @theme main |
762 | + */ |
763 | + .bodyContent div{ |
764 | + /*@editable*/ color:#505050; |
765 | + /*@editable*/ font-family:Arial; |
766 | + /*@editable*/ font-size:14px; |
767 | + /*@editable*/ line-height:150%; |
768 | + /*@editable*/ text-align:justify; |
769 | + } |
770 | + |
771 | + /** |
772 | + * @tab Body |
773 | + * @section body link |
774 | + * @tip Set the styling for your email's main content links. Choose a color that helps them stand out from your text. |
775 | + */ |
776 | + .bodyContent div a:link, .bodyContent div a:visited, /* Yahoo! Mail Override */ .bodyContent div a .yshortcuts /* Yahoo! Mail Override */{ |
777 | + /*@editable*/ color:#336699; |
778 | + /*@editable*/ font-weight:normal; |
779 | + /*@editable*/ text-decoration:underline; |
780 | + } |
781 | + |
782 | + .bodyContent img{ |
783 | + display:inline; |
784 | + height:auto; |
785 | + } |
786 | + |
787 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: SIDEBAR /\/\/\/\/\/\/\/\/\/\ */ |
788 | + |
789 | + /** |
790 | + * @tab Sidebar |
791 | + * @section sidebar style |
792 | + * @tip Set the background color and border for your email's sidebar area. |
793 | + */ |
794 | + #templateSidebar{ |
795 | + /*@editable*/ background-color:#FDFDFD; |
796 | + } |
797 | + |
798 | + /** |
799 | + * @tab Sidebar |
800 | + * @section sidebar style |
801 | + * @tip Set the background color and border for your email's sidebar area. |
802 | + */ |
803 | + .sidebarContent{ |
804 | + /*@editable*/ border-right:1px solid #DDDDDD; |
805 | + } |
806 | + |
807 | + /** |
808 | + * @tab Sidebar |
809 | + * @section sidebar text |
810 | + * @tip Set the styling for your email's sidebar text. Choose a size and color that is easy to read. |
811 | + */ |
812 | + .sidebarContent div{ |
813 | + /*@editable*/ color:#505050; |
814 | + /*@editable*/ font-family:Arial; |
815 | + /*@editable*/ font-size:10px; |
816 | + /*@editable*/ line-height:150%; |
817 | + /*@editable*/ text-align:left; |
818 | + } |
819 | + |
820 | + /** |
821 | + * @tab Sidebar |
822 | + * @section sidebar link |
823 | + * @tip Set the styling for your email's sidebar links. Choose a color that helps them stand out from your text. |
824 | + */ |
825 | + .sidebarContent div a:link, .sidebarContent div a:visited, /* Yahoo! Mail Override */ .sidebarContent div a .yshortcuts /* Yahoo! Mail Override */{ |
826 | + /*@editable*/ color:#336699; |
827 | + /*@editable*/ font-weight:normal; |
828 | + /*@editable*/ text-decoration:underline; |
829 | + } |
830 | + |
831 | + .sidebarContent img{ |
832 | + display:inline; |
833 | + height:auto; |
834 | + } |
835 | + |
836 | + /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: FOOTER /\/\/\/\/\/\/\/\/\/\ */ |
837 | + |
838 | + /** |
839 | + * @tab Footer |
840 | + * @section footer style |
841 | + * @tip Set the background color and top border for your email's footer area. |
842 | + * @theme footer |
843 | + */ |
844 | + #templateFooter{ |
845 | + /*@editable*/ background-color:#FAFAFA; |
846 | + /*@editable*/ border-top:3px solid #909090; |
847 | + } |
848 | + |
849 | + /** |
850 | + * @tab Footer |
851 | + * @section footer text |
852 | + * @tip Set the styling for your email's footer text. Choose a size and color that is easy to read. |
853 | + * @theme footer |
854 | + */ |
855 | + .footerContent div{ |
856 | + /*@editable*/ color:#707070; |
857 | + /*@editable*/ font-family:Arial; |
858 | + /*@editable*/ font-size:11px; |
859 | + /*@editable*/ line-height:125%; |
860 | + /*@editable*/ text-align:left; |
861 | + } |
862 | + |
863 | + /** |
864 | + * @tab Footer |
865 | + * @section footer link |
866 | + * @tip Set the styling for your email's footer links. Choose a color that helps them stand out from your text. |
867 | + */ |
868 | + .footerContent div a:link, .footerContent div a:visited, /* Yahoo! Mail Override */ .footerContent div a .yshortcuts /* Yahoo! Mail Override */{ |
869 | + /*@editable*/ color:#336699; |
870 | + /*@editable*/ font-weight:normal; |
871 | + /*@editable*/ text-decoration:underline; |
872 | + } |
873 | + |
874 | + .footerContent img{ |
875 | + display:inline; |
876 | + } |
877 | + |
878 | + /** |
879 | + * @tab Footer |
880 | + * @section social bar style |
881 | + * @tip Set the background color and border for your email's footer social bar. |
882 | + * @theme footer |
883 | + */ |
884 | + #social{ |
885 | + /*@editable*/ background-color:#FFFFFF; |
886 | + /*@editable*/ border:0; |
887 | + } |
888 | + |
889 | + /** |
890 | + * @tab Footer |
891 | + * @section social bar style |
892 | + * @tip Set the background color and border for your email's footer social bar. |
893 | + */ |
894 | + #social div{ |
895 | + /*@editable*/ text-align:left; |
896 | + } |
897 | + |
898 | + /** |
899 | + * @tab Footer |
900 | + * @section utility bar style |
901 | + * @tip Set the background color and border for your email's footer utility bar. |
902 | + * @theme footer |
903 | + */ |
904 | + #utility{ |
905 | + /*@editable*/ background-color:#FAFAFA; |
906 | + /*@editable*/ border-top:0; |
907 | + } |
908 | + |
909 | + /** |
910 | + * @tab Footer |
911 | + * @section utility bar style |
912 | + * @tip Set the background color and border for your email's footer utility bar. |
913 | + */ |
914 | + #utility div{ |
915 | + /*@editable*/ text-align:left; |
916 | + } |
917 | + |
918 | + #monkeyRewards img{ |
919 | + max-width:170px !important; |
920 | + } |
921 | + </style> |
922 | + </head> |
923 | + <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> |
924 | + <center> |
925 | + <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable"> |
926 | + <tr> |
927 | + <td align="center" valign="top"> |
928 | + <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateContainer"> |
929 | + <tr style="margin: 0px; padding: 0px; background-color: rgb(247, 247, 247);"> |
930 | + <td align="center" valign="top"> |
931 | + <!-- // Begin Template Header \\ --> |
932 | + <table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin: 0px; padding: 0px; background-color: rgb(253, 253, 253);"> |
933 | + <tr> |
934 | + <td class="headerContent"> |
935 | + <img src="https://pbs.twimg.com/profile_images/2137139487/logo-vauxoo-lp.jpg" style="max-width:60px; padding: 2px 2px 2px;" id="headerImage campaign-icon" mc:label="header_image" mc:edit="header_image" mc:allowtext /> |
936 | + </td> |
937 | + |
938 | + <td class="headerContent" width="100%" style="padding-left:10px; padding-right:20px;"> |
939 | + <div mc:edit="Header_content"> |
940 | + <h2> |
941 | + NAME_HU |
942 | + </h2> |
943 | + </div> |
944 | + </td> |
945 | + </tr> |
946 | + </table> |
947 | + <!-- // End Template Header \\ --> |
948 | + </td> |
949 | + </tr> |
950 | + <tr> |
951 | + <td align="center" style="margin: 0px; padding: 0px; width: 600px; background-color: #951510"> |
952 | + <div style="font-size:1.3em; font-family:Arial; color:#FFFFFF;"><b> |
953 | + Historia de Usuario |
954 | + </b></div> |
955 | + </td> |
956 | + </tr> |
957 | + <tr> |
958 | + <td align="center" valign="top"> |
959 | + <!-- // Begin Template Body \\ --> |
960 | + <table border="0" cellpadding="10" cellspacing="0" width="600" style="margin: 0px; padding: 0px; width: 600px; background-color: rgb(247, 247, 247);"> |
961 | + <tr> |
962 | + <!-- // Begin Sidebar \\ --> |
963 | + <td valign="top" width="180" id="templateSidebar"> |
964 | + <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
965 | + <tr> |
966 | + <td valign="top"> |
967 | + </td> |
968 | + </tr> |
969 | + </table> |
970 | + </td> |
971 | + <!-- // End Sidebar \\ --> |
972 | + <td valign="top" class="bodyContent"> |
973 | + |
974 | + <!-- // Begin Module: Standard Content \\ --> |
975 | + <table border="0" cellpadding="10" cellspacing="0" width="600"> |
976 | + <tr> |
977 | + <td valign="top" style="padding-left:0;"> |
978 | + <div mc:edit="std_content00"> |
979 | + <h2 class="h2">Estimad@ NAME_OWNER</h2> |
980 | + <h3 class="h3"> |
981 | + La Historia de Usuario ha sido culminada, se encuentra actualmente en espera de que usted proceda a realizar la verificación de la misma, con sus Criterios de Aceptación. |
982 | + </h3> |
983 | + <pre style="font-size:1.1em; font-family:Arial"> |
984 | +El proceso a seguir es: |
985 | + |
986 | +1) Entrar en la base de datos de Vauxoo a través del link ubicado al final de este email. |
987 | +2) Seleccionar el botón "editar" en la Historia de Usuario. |
988 | +3) Revisar los Criterios de Aceptación. |
989 | +4) Verificar que los Criterios de Aceptación se cumplan. |
990 | +5) Una vez verificado cada criterio seleccionar la casilla "aceptar" lo que indica que se está conforme con el resultado revisado. |
991 | + |
992 | +Todos los criterios de aceptación serán re-validados junto a un consultor de Vauxoo al final del Sprint, de tal manera de cerrar formalmente el cumplimiento del requerimiento. |
993 | + |
994 | + |
995 | +Agradeciendo su atención. |
996 | + |
997 | +Ante cualquier duda estamos a su disposición. |
998 | + </pre> |
999 | + <br /> |
1000 | + </div> |
1001 | + </td> |
1002 | + </tr> |
1003 | + </table> |
1004 | + <!-- // End Module: Standard Content \\ --> |
1005 | + |
1006 | + </td> |
1007 | + </tr> |
1008 | + </table> |
1009 | + <!-- // End Template Body \\ --> |
1010 | + </td> |
1011 | + </table> |
1012 | + <br /> |
1013 | + </td> |
1014 | + </tr> |
1015 | + </table> |
1016 | + </center> |
1017 | + </body> |
1018 | +</html> |
1019 | |
1020 | ]]></field> |
1021 | </record> |
1022 | |
1023 | === modified file 'user_story/model/user_story.py' |
1024 | --- user_story/model/user_story.py 2014-03-17 21:49:54 +0000 |
1025 | +++ user_story/model/user_story.py 2014-03-26 20:24:07 +0000 |
1026 | @@ -24,6 +24,7 @@ |
1027 | from openerp.tools.translate import _ |
1028 | |
1029 | import time |
1030 | +import unicodedata |
1031 | |
1032 | _US_STATE = [('draft', 'New'), ('open', 'In Progress'), ( |
1033 | 'pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')] |
1034 | @@ -82,9 +83,118 @@ |
1035 | ('userstory_id', '=', ids[0])]) |
1036 | task_obj.write(cr, uid, task_ids, { |
1037 | 'sprint_id': vals.get('sk_id')}, context=context) |
1038 | + |
1039 | + if 'accep_crit_ids' in vals: |
1040 | + ac_obj = self.pool.get('acceptability.criteria') |
1041 | + criteria = [False, False] |
1042 | + for ac in vals.get('accep_crit_ids'): |
1043 | + if ac[2] and ac[2].get('accepted', False): |
1044 | + if ac[1]: |
1045 | + ac_brw = ac_obj.browse(cr, uid, ac[1] , context=context) |
1046 | + criteria[1] = ac_brw.name |
1047 | + else: |
1048 | + criteria[1] = ac[2].get('name', False) |
1049 | + |
1050 | + body = self.body_criteria(cr, uid, ids, 'template_send_email_hu', criteria[1], context) |
1051 | + hu = self.browse(cr, uid, ids[0], context=context) |
1052 | + subject = 'Se acepta Criterio de Aceptacion "%s"... en la Historia de Usuario %s' % (criteria[1][:30],hu.id) |
1053 | + self.send_mail_hu(cr, uid, ids, subject, body, hu.id, users=False, context=context) |
1054 | return super(user_story, self).write(cr, uid, ids, |
1055 | vals, context=context) |
1056 | |
1057 | + def body_progress(self, cr, uid, ids, template, hu, context=None): |
1058 | + imd_obj = self.pool.get('ir.model.data') |
1059 | + template_ids = imd_obj.search( |
1060 | + cr, uid, [('model', '=', 'email.template'), ('name', '=', template)]) |
1061 | + if template_ids: |
1062 | + res_id = imd_obj.read( |
1063 | + cr, uid, template_ids, ['res_id'])[0]['res_id'] |
1064 | + body_html = self.pool.get('email.template').read( |
1065 | + cr, uid, res_id, ['body_html']).get('body_html') |
1066 | + |
1067 | + user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0] |
1068 | + hu = self.browse(cr, uid, ids[0], context=context) |
1069 | + |
1070 | + return body_html |
1071 | + else: |
1072 | + return False |
1073 | + |
1074 | + def body_criteria(self, cr, uid, ids, template, criteria, context=None): |
1075 | + imd_obj = self.pool.get('ir.model.data') |
1076 | + template_ids = imd_obj.search( |
1077 | + cr, uid, [('model', '=', 'email.template'), ('name', '=', template)]) |
1078 | + if template_ids: |
1079 | + res_id = imd_obj.read( |
1080 | + cr, uid, template_ids, ['res_id'])[0]['res_id'] |
1081 | + body_html = self.pool.get('email.template').read( |
1082 | + cr, uid, res_id, ['body_html']).get('body_html') |
1083 | + |
1084 | + user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0] |
1085 | + hu = self.browse(cr, uid, ids[0], context=context) |
1086 | + |
1087 | + body_html = body_html.replace('NAME_OWNER', hu.owner) |
1088 | + body_html = body_html.replace('NAME_USER', user_id.name) |
1089 | + body_html = body_html.replace('NAME_CRI', criteria) |
1090 | + body_html = body_html.replace('NAME_HU', hu.name) |
1091 | + |
1092 | + return body_html |
1093 | + |
1094 | + else: |
1095 | + return False |
1096 | + |
1097 | + |
1098 | + def send_mail_hu(self, cr, uid, ids, subject, body, res_id, users=[], context=None): |
1099 | + if not users: |
1100 | + followers = self.read(cr, uid, ids[0], [ |
1101 | + 'message_follower_ids'])['message_follower_ids'] |
1102 | + else: |
1103 | + followers = [] |
1104 | + user_obj = self.pool.get('res.users') |
1105 | + hu = self.browse(cr, uid, res_id, context=context) |
1106 | + |
1107 | + owner_name = unicodedata.normalize('NFKD', hu.owner) |
1108 | + owner_name = owner_name.encode('ASCII','ignore') |
1109 | + owner_id = user_obj.search(cr, uid, [('name','=',owner_name)], context=context) |
1110 | + |
1111 | + if hu.user_id and hu.user_id.partner_id: |
1112 | + followers.append(hu.user_id.partner_id.id) |
1113 | + if hu.user_execute_id and hu.user_execute_id.partner_id: |
1114 | + followers.append(hu.user_execute_id.partner_id.id) |
1115 | + if owner_id and len(owner_id)==1: |
1116 | + user_o = user_obj.browse(cr,uid,owner_id,context=context) |
1117 | + followers.append( user_o[0].partner_id.id) |
1118 | + |
1119 | + context.update({ |
1120 | + 'default_body': body, |
1121 | + }) |
1122 | + user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0] |
1123 | + |
1124 | + mail_mail = self.pool.get('mail.mail') |
1125 | + mail_id = mail_mail.create(cr, uid, |
1126 | + { |
1127 | + 'model': 'user.story', |
1128 | + 'res_id': res_id, |
1129 | + 'subject': subject, |
1130 | + 'body_html': body, |
1131 | + 'auto_delete': False, |
1132 | + 'email_from': user_id.email, |
1133 | + }, context=context) |
1134 | + mail_mail.send(cr, uid, [mail_id], |
1135 | + recipient_ids=followers, |
1136 | + context=context) |
1137 | + |
1138 | + |
1139 | + return False |
1140 | + |
1141 | + def create(self, cr, uid, vals, context=None): |
1142 | + if context is None: context = {} |
1143 | + # Prevent double project creation when 'use_tasks' is checked! |
1144 | + context = dict(context, user_story_creation_in_progress=True) |
1145 | + context['name'] = "User Story / %s" % (vals['name']) |
1146 | + if vals.get('type', False) not in ('template','contract'): |
1147 | + vals['type'] = 'contract' |
1148 | + user_story_id = super(user_story, self).create(cr, uid, vals, context=context) |
1149 | + return user_story_id |
1150 | |
1151 | _columns = { |
1152 | 'name': fields.char('Title', size=255, required=True, readonly=False, |
1153 | @@ -144,6 +254,11 @@ |
1154 | return self.write(cr, uid, ids, {'state': 'open'}, context=context) |
1155 | |
1156 | def do_pending(self, cr, uid, ids, context=None): |
1157 | + body = self.body_criteria(cr, uid, ids, 'template_send_email_hu_progress', 'hu', context) |
1158 | + hu_model = self.pool.get('user.story') |
1159 | + hu = hu_model.browse(cr, uid, ids[0], context=context) |
1160 | + subject = 'The User Story with ID %s, "%s...", is now in Pending state' % ( hu.id, hu.name[:30] ) |
1161 | + self.send_mail_hu(cr, uid, ids, subject, body, hu.id, users=True, context=context) |
1162 | return self.write(cr, uid, ids, {'state': 'pending'}, context=context) |
1163 | |
1164 | def do_done(self, cr, uid, ids, context=None): |
1165 | |
1166 | === modified file 'user_story/view/userstory_view.xml' |
1167 | --- user_story/view/userstory_view.xml 2014-03-14 21:54:48 +0000 |
1168 | +++ user_story/view/userstory_view.xml 2014-03-26 20:24:07 +0000 |
1169 | @@ -101,8 +101,6 @@ |
1170 | <field name="name"/> |
1171 | <field name="scenario"/> |
1172 | <field name="accepted"/> |
1173 | - <field name="development"/> |
1174 | - <field name="difficulty"/> |
1175 | </tree> |
1176 | </field> |
1177 | </page> |
1178 | |
1179 | === modified file 'user_story_long_term/__openerp__.py' |
1180 | --- user_story_long_term/__openerp__.py 2014-03-25 15:19:09 +0000 |
1181 | +++ user_story_long_term/__openerp__.py 2014-03-26 20:24:07 +0000 |
1182 | @@ -50,7 +50,7 @@ |
1183 | #'security/ir.model.access.csv', |
1184 | 'user_story_long_term_view.xml', |
1185 | 'workflow/user_story_long_term_workflow.xml', |
1186 | - 'data/user_story_template.xml', |
1187 | + #'data/user_story_template.xml', |
1188 | #'wizard/user_story_compute_phases_view.xml', |
1189 | #'wizard/user_story_compute_tasks_view.xml', |
1190 | ], |
1191 | |
1192 | === modified file 'user_story_long_term/user_story_long_term.py' |
1193 | --- user_story_long_term/user_story_long_term.py 2014-03-25 15:15:07 +0000 |
1194 | +++ user_story_long_term/user_story_long_term.py 2014-03-26 20:24:07 +0000 |
1195 | @@ -232,121 +232,6 @@ |
1196 | class user_story(osv.Model): |
1197 | _inherit = 'user.story' |
1198 | |
1199 | - def body_progress(self, cr, uid, ids, template, hu, context=None): |
1200 | - imd_obj = self.pool.get('ir.model.data') |
1201 | - template_ids = imd_obj.search( |
1202 | - cr, uid, [('model', '=', 'email.template'), ('name', '=', template)]) |
1203 | - if template_ids: |
1204 | - res_id = imd_obj.read( |
1205 | - cr, uid, template_ids, ['res_id'])[0]['res_id'] |
1206 | - body_html = self.pool.get('email.template').read( |
1207 | - cr, uid, res_id, ['body_html']).get('body_html') |
1208 | - |
1209 | - user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0] |
1210 | - hu = self.browse(cr, uid, ids[0], context=context) |
1211 | - |
1212 | - #body_html = body_html.replace('NAME_HU',str(hu.id)) |
1213 | - return body_html |
1214 | - else: |
1215 | - return False |
1216 | - |
1217 | - |
1218 | - def do_pending(self, cr, uid, ids, context=None): |
1219 | - |
1220 | - body = self.body_criteria(cr, uid, ids, 'template_send_email_hu_progress', 'hu', context) |
1221 | - hu_model = self.pool.get('user.story') |
1222 | - hu = hu_model.browse(cr, uid, ids[0], context=context) |
1223 | - subject = 'The User Story with ID %s, "%s...", is now in Pending state' % ( hu.id, hu.name[:30] ) |
1224 | - self.send_mail_hu(cr, uid, ids, subject, body, hu.id, users=True, context=context) |
1225 | - |
1226 | - return super(user_story, self).do_pending(cr, uid, ids, context=context) |
1227 | - |
1228 | - def body_criteria(self, cr, uid, ids, template, criteria, context=None): |
1229 | - imd_obj = self.pool.get('ir.model.data') |
1230 | - template_ids = imd_obj.search( |
1231 | - cr, uid, [('model', '=', 'email.template'), ('name', '=', template)]) |
1232 | - if template_ids: |
1233 | - res_id = imd_obj.read( |
1234 | - cr, uid, template_ids, ['res_id'])[0]['res_id'] |
1235 | - body_html = self.pool.get('email.template').read( |
1236 | - cr, uid, res_id, ['body_html']).get('body_html') |
1237 | - |
1238 | - user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0] |
1239 | - hu = self.browse(cr, uid, ids[0], context=context) |
1240 | - |
1241 | - body_html = body_html.replace('NAME_USER', user_id.name) |
1242 | - body_html = body_html.replace('NAME_CRI', criteria) |
1243 | - body_html = body_html.replace('NAME_HU', hu.name) |
1244 | - |
1245 | - return body_html |
1246 | - |
1247 | - else: |
1248 | - return False |
1249 | - |
1250 | - |
1251 | - def send_mail_hu(self, cr, uid, ids, subject, body, res_id, users=[], context=None): |
1252 | - if not users: |
1253 | - followers = self.read(cr, uid, ids[0], [ |
1254 | - 'message_follower_ids'])['message_follower_ids'] |
1255 | - else: |
1256 | - followers = [] |
1257 | - user_obj = self.pool.get('res.users') |
1258 | - hu = self.browse(cr, uid, res_id, context=context) |
1259 | - |
1260 | - owner_name = unicodedata.normalize('NFKD', hu.owner) |
1261 | - owner_name = owner_name.encode('ASCII','ignore') |
1262 | - owner_id = user_obj.search(cr, uid, [('name','=',owner_name)], context=context) |
1263 | - |
1264 | - if hu.user_id and hu.user_id.partner_id: |
1265 | - followers.append(hu.user_id.partner_id.id) |
1266 | - if hu.user_execute_id and hu.user_execute_id.partner_id: |
1267 | - followers.append(hu.user_execute_id.partner_id.id) |
1268 | - if owner_id and len(owner_id)==1: |
1269 | - user_o = user_obj.browse(cr,uid,owner_id,context=context) |
1270 | - followers.append( user_o[0].partner_id.id) |
1271 | - |
1272 | - context.update({ |
1273 | - 'default_body': body, |
1274 | - }) |
1275 | - user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0] |
1276 | - |
1277 | - mail_mail = self.pool.get('mail.mail') |
1278 | - mail_id = mail_mail.create(cr, uid, |
1279 | - { |
1280 | - 'model': 'user.story', |
1281 | - 'res_id': res_id, |
1282 | - 'subject': subject, |
1283 | - 'body_html': body, |
1284 | - 'auto_delete': False, |
1285 | - 'email_from': user_id.email, |
1286 | - }, context=context) |
1287 | - mail_mail.send(cr, uid, [mail_id], |
1288 | - recipient_ids=followers, |
1289 | - context=context) |
1290 | - |
1291 | - |
1292 | - return False |
1293 | - |
1294 | - def write(self, cr, uid, ids, vals, context=None): |
1295 | - res = super(user_story, self).write(cr, uid, ids, vals, context=context) |
1296 | - |
1297 | - if 'accep_crit_ids' in vals: |
1298 | - ac_obj = self.pool.get('acceptability.criteria') |
1299 | - criteria = [False, False] |
1300 | - for ac in vals.get('accep_crit_ids'): |
1301 | - if ac[2] and ac[2].get('accepted', False): |
1302 | - if ac[1]: |
1303 | - ac_brw = ac_obj.browse(cr, uid, ac[1] , context=context) |
1304 | - criteria[1] = ac_brw.name |
1305 | - else: |
1306 | - criteria[1] = ac[2].get('name', False) |
1307 | - |
1308 | - body = self.body_criteria(cr, uid, ids, 'template_send_email_hu', criteria[1], context) |
1309 | - hu = self.browse(cr, uid, ids[0], context=context) |
1310 | - subject = 'Accepted Criteria - "%s"... in User Story with ID %s' % (criteria[1][:30],hu.id) |
1311 | - self.send_mail_hu(cr, uid, ids, subject, body, hu.id, users=False, context=context) |
1312 | - return res |
1313 | - |
1314 | def _phase_count(self, cr, uid, ids, field_name, arg, context=None): |
1315 | res = dict.fromkeys(ids, 0) |
1316 | phase_ids = self.pool.get('user.story.phase').search(cr, uid, [('user_story_id', 'in', ids)]) |