Merge lp:~vauxoo/addons-vauxoo/7.0-improvements_hu_task_1184-dev-yani into lp:addons-vauxoo/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
Reviewer Review Type Date Requested Status
Gabriela Quilarque Approve
Review via email: mp+212917@code.launchpad.net

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_long_term.

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
Gabriela Quilarque (gabrielaquilarque97) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'user_story/__openerp__.py'
--- user_story/__openerp__.py 2014-02-28 03:29:36 +0000
+++ user_story/__openerp__.py 2014-03-26 20:24:07 +0000
@@ -61,6 +61,7 @@
61 "view/userstory_view.xml",61 "view/userstory_view.xml",
62 "view/project_view.xml",62 "view/project_view.xml",
63 "data/data.xml",63 "data/data.xml",
64 "data/user_story_template.xml",
64 ],65 ],
65 "active": False,66 "active": False,
66 "images": [],67 "images": [],
6768
=== renamed file 'user_story_long_term/data/user_story_template.xml' => 'user_story/data/user_story_template.xml'
--- user_story_long_term/data/user_story_template.xml 2014-03-25 15:15:07 +0000
+++ user_story/data/user_story_template.xml 2014-03-26 20:24:07 +0000
@@ -1,12 +1,12 @@
1<?xml version="1.0"?>1<?xml version="1.0"?>
2<openerp>2<openerp>
3 <data noupdate="1">3 <data noupdate="0">
4 <!-- 4 <!--
5 =====================================================5 =====================================================
6 SEND EMAIL TEMPLATE6 SEND EMAIL TEMPLATE
7 =====================================================7 =====================================================
8 --> 8 -->
9 <record id="template_send_email_hu" model="email.template">9 <record id="template_send_email_hu" model="email.template" forcecreate="True">
10 <field name="name">Accept Criteria</field>10 <field name="name">Accept Criteria</field>
11 <field name="email_from"></field>11 <field name="email_from"></field>
12 <field name="model_id" ref="user_story.model_user_story" />12 <field name="model_id" ref="user_story.model_user_story" />
@@ -19,20 +19,482 @@
19 <field name="email_to"></field>19 <field name="email_to"></field>
20 <field name="sequence">5</field>20 <field name="sequence">5</field>
21 <field name="body_html"><![CDATA[21 <field name="body_html"><![CDATA[
22 <html>22<html>
23 <head>23 <head>
24 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />24 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
25 <title>*|MC:SUBJECT|*</title>25 <title>*|MC:SUBJECT|*</title>
26 </head>26 <style type="text/css">
27 <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">27 /* Client-specific Styles */
28 In the User Story "NAME_HU", the "NAME_CRI" criteria has been accepted by NAME_USER.28 #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */
29 </body>29 body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
30 </html>30 body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */
3131
32 /* Reset Styles */
33 body{margin:0; padding:0;}
34 img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}
35 table td{border-collapse:collapse;}
36 #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;}
37
38 /* Template Styles */
39
40 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: COMMON PAGE ELEMENTS /\/\/\/\/\/\/\/\/\/\ */
41
42 /**
43 * @tab Page
44 * @section background color
45 * @tip Set the background color for your email. You may want to choose one that matches your company's branding.
46 * @theme page
47 */
48 body, #backgroundTable{
49 /*@editable*/ background-color:#FAFAFA;
50 }
51
52 /**
53 * @tab Page
54 * @section email border
55 * @tip Set the border for your email.
56 */
57 #templateContainer{
58 /*@editable*/ border:0;
59 }
60
61 /**
62 * @tab Page
63 * @section heading 1
64 * @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
65 * @style heading 1
66 */
67 h1, .h1{
68 /*@editable*/ color:#202020;
69 display:block;
70 /*@editable*/ font-family:Arial;
71 /*@editable*/ font-size:40px;
72 /*@editable*/ font-weight:bold;
73 /*@editable*/ line-height:100%;
74 margin-top:2%;
75 margin-right:0;
76 margin-bottom:1%;
77 margin-left:0;
78 /*@editable*/ text-align:left;
79 }
80
81 /**
82 * @tab Page
83 * @section heading 2
84 * @tip Set the styling for all second-level headings in your emails.
85 * @style heading 2
86 */
87 h2, .h2{
88 /*@editable*/ color:#404040;
89 display:block;
90 /*@editable*/ font-family:Arial;
91 /*@editable*/ font-size:18px;
92 /*@editable*/ font-weight:bold;
93 /*@editable*/ line-height:100%;
94 margin-top:2%;
95 margin-right:0;
96 margin-bottom:1%;
97 margin-left:0;
98 /*@editable*/ text-align:left;
99 }
100
101 /**
102 * @tab Page
103 * @section heading 3
104 * @tip Set the styling for all third-level headings in your emails.
105 * @style heading 3
106 */
107 h3, .h3{
108 /*@editable*/ color:#606060;
109 display:block;
110 /*@editable*/ font-family:Arial;
111 /*@editable*/ font-size:16px;
112 /*@editable*/ font-weight:bold;
113 /*@editable*/ line-height:100%;
114 margin-top:2%;
115 margin-right:0;
116 margin-bottom:1%;
117 margin-left:0;
118 /*@editable*/ text-align:left;
119 }
120
121 /**
122 * @tab Page
123 * @section heading 4
124 * @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
125 * @style heading 4
126 */
127 h4, .h4{
128 /*@editable*/ color:#808080;
129 display:block;
130 /*@editable*/ font-family:Arial;
131 /*@editable*/ font-size:14px;
132 /*@editable*/ font-weight:bold;
133 /*@editable*/ line-height:100%;
134 margin-top:2%;
135 margin-right:0;
136 margin-bottom:1%;
137 margin-left:0;
138 /*@editable*/ text-align:left;
139 }
140
141 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: PREHEADER /\/\/\/\/\/\/\/\/\/\ */
142
143 /**
144 * @tab Header
145 * @section preheader style
146 * @tip Set the background color for your email's preheader area.
147 * @theme page
148 */
149 #templatePreheader{
150 /*@editable*/ background-color:#FAFAFA;
151 }
152
153 /**
154 * @tab Header
155 * @section preheader text
156 * @tip Set the styling for your email's preheader text. Choose a size and color that is easy to read.
157 */
158 .preheaderContent div{
159 /*@editable*/ color:#707070;
160 /*@editable*/ font-family:Arial;
161 /*@editable*/ font-size:10px;
162 /*@editable*/ line-height:100%;
163 /*@editable*/ text-align:left;
164 }
165
166 /**
167 * @tab Header
168 * @section preheader link
169 * @tip Set the styling for your email's preheader links. Choose a color that helps them stand out from your text.
170 */
171 .preheaderContent div a:link, .preheaderContent div a:visited, /* Yahoo! Mail Override */ .preheaderContent div a .yshortcuts /* Yahoo! Mail Override */{
172 /*@editable*/ color:#336699;
173 /*@editable*/ font-weight:normal;
174 /*@editable*/ text-decoration:underline;
175 }
176
177 /**
178 * @tab Header
179 * @section social bar style
180 * @tip Set the background color and border for your email's footer social bar.
181 */
182 #social div{
183 /*@editable*/ text-align:right;
184 }
185
186 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: HEADER /\/\/\/\/\/\/\/\/\/\ */
187
188 /**
189 * @tab Header
190 * @section header style
191 * @tip Set the background color and border for your email's header area.
192 * @theme header
193 */
194 #templateHeader{
195 /*@editable*/ background-color:#FFFFFF;
196 /*@editable*/ border-bottom:5px solid #505050;
197 }
198
199 /**
200 * @tab Header
201 * @section header text
202 * @tip Set the styling for your email's header text. Choose a size and color that is easy to read.
203 */
204 .headerContent{
205 /*@editable*/ color:#202020;
206 /*@editable*/ font-family:Arial;
207 /*@editable*/ font-size:34px;
208 /*@editable*/ font-weight:bold;
209 /*@editable*/ line-height:100%;
210 /*@editable*/ padding:10px;
211 /*@editable*/ text-align:right;
212 /*@editable*/ vertical-align:middle;
213 }
214
215 /**
216 * @tab Header
217 * @section header link
218 * @tip Set the styling for your email's header links. Choose a color that helps them stand out from your text.
219 */
220 .headerContent a:link, .headerContent a:visited, /* Yahoo! Mail Override */ .headerContent a .yshortcuts /* Yahoo! Mail Override */{
221 /*@editable*/ color:#336699;
222 /*@editable*/ font-weight:normal;
223 /*@editable*/ text-decoration:underline;
224 }
225
226 #headerImage{
227 height:auto;
228 max-width:600px !important;
229 }
230
231 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: MAIN BODY /\/\/\/\/\/\/\/\/\/\ */
232
233 /**
234 * @tab Body
235 * @section body style
236 * @tip Set the background color for your email's body area.
237 */
238 #templateContainer, .bodyContent{
239 /*@editable*/ background-color:#FDFDFD;
240 }
241
242 /**
243 * @tab Body
244 * @section body text
245 * @tip Set the styling for your email's main content text. Choose a size and color that is easy to read.
246 * @theme main
247 */
248 .bodyContent div{
249 /*@editable*/ color:#505050;
250 /*@editable*/ font-family:Arial;
251 /*@editable*/ font-size:14px;
252 /*@editable*/ line-height:150%;
253 /*@editable*/ text-align:justify;
254 }
255
256 /**
257 * @tab Body
258 * @section body link
259 * @tip Set the styling for your email's main content links. Choose a color that helps them stand out from your text.
260 */
261 .bodyContent div a:link, .bodyContent div a:visited, /* Yahoo! Mail Override */ .bodyContent div a .yshortcuts /* Yahoo! Mail Override */{
262 /*@editable*/ color:#336699;
263 /*@editable*/ font-weight:normal;
264 /*@editable*/ text-decoration:underline;
265 }
266
267 .bodyContent img{
268 display:inline;
269 height:auto;
270 }
271
272 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: SIDEBAR /\/\/\/\/\/\/\/\/\/\ */
273
274 /**
275 * @tab Sidebar
276 * @section sidebar style
277 * @tip Set the background color and border for your email's sidebar area.
278 */
279 #templateSidebar{
280 /*@editable*/ background-color:#FDFDFD;
281 }
282
283 /**
284 * @tab Sidebar
285 * @section sidebar style
286 * @tip Set the background color and border for your email's sidebar area.
287 */
288 .sidebarContent{
289 /*@editable*/ border-right:1px solid #DDDDDD;
290 }
291
292 /**
293 * @tab Sidebar
294 * @section sidebar text
295 * @tip Set the styling for your email's sidebar text. Choose a size and color that is easy to read.
296 */
297 .sidebarContent div{
298 /*@editable*/ color:#505050;
299 /*@editable*/ font-family:Arial;
300 /*@editable*/ font-size:10px;
301 /*@editable*/ line-height:150%;
302 /*@editable*/ text-align:left;
303 }
304
305 /**
306 * @tab Sidebar
307 * @section sidebar link
308 * @tip Set the styling for your email's sidebar links. Choose a color that helps them stand out from your text.
309 */
310 .sidebarContent div a:link, .sidebarContent div a:visited, /* Yahoo! Mail Override */ .sidebarContent div a .yshortcuts /* Yahoo! Mail Override */{
311 /*@editable*/ color:#336699;
312 /*@editable*/ font-weight:normal;
313 /*@editable*/ text-decoration:underline;
314 }
315
316 .sidebarContent img{
317 display:inline;
318 height:auto;
319 }
320
321 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: FOOTER /\/\/\/\/\/\/\/\/\/\ */
322
323 /**
324 * @tab Footer
325 * @section footer style
326 * @tip Set the background color and top border for your email's footer area.
327 * @theme footer
328 */
329 #templateFooter{
330 /*@editable*/ background-color:#FAFAFA;
331 /*@editable*/ border-top:3px solid #909090;
332 }
333
334 /**
335 * @tab Footer
336 * @section footer text
337 * @tip Set the styling for your email's footer text. Choose a size and color that is easy to read.
338 * @theme footer
339 */
340 .footerContent div{
341 /*@editable*/ color:#707070;
342 /*@editable*/ font-family:Arial;
343 /*@editable*/ font-size:11px;
344 /*@editable*/ line-height:125%;
345 /*@editable*/ text-align:left;
346 }
347
348 /**
349 * @tab Footer
350 * @section footer link
351 * @tip Set the styling for your email's footer links. Choose a color that helps them stand out from your text.
352 */
353 .footerContent div a:link, .footerContent div a:visited, /* Yahoo! Mail Override */ .footerContent div a .yshortcuts /* Yahoo! Mail Override */{
354 /*@editable*/ color:#336699;
355 /*@editable*/ font-weight:normal;
356 /*@editable*/ text-decoration:underline;
357 }
358
359 .footerContent img{
360 display:inline;
361 }
362
363 /**
364 * @tab Footer
365 * @section social bar style
366 * @tip Set the background color and border for your email's footer social bar.
367 * @theme footer
368 */
369 #social{
370 /*@editable*/ background-color:#FFFFFF;
371 /*@editable*/ border:0;
372 }
373
374 /**
375 * @tab Footer
376 * @section social bar style
377 * @tip Set the background color and border for your email's footer social bar.
378 */
379 #social div{
380 /*@editable*/ text-align:left;
381 }
382
383 /**
384 * @tab Footer
385 * @section utility bar style
386 * @tip Set the background color and border for your email's footer utility bar.
387 * @theme footer
388 */
389 #utility{
390 /*@editable*/ background-color:#FAFAFA;
391 /*@editable*/ border-top:0;
392 }
393
394 /**
395 * @tab Footer
396 * @section utility bar style
397 * @tip Set the background color and border for your email's footer utility bar.
398 */
399 #utility div{
400 /*@editable*/ text-align:left;
401 }
402
403 #monkeyRewards img{
404 max-width:170px !important;
405 }
406 </style>
407 </head>
408 <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
409 <center>
410 <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable">
411 <tr>
412 <td align="center" valign="top">
413 <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateContainer">
414 <tr style="margin: 0px; padding: 0px; background-color: rgb(247, 247, 247);">
415 <td align="center" valign="top">
416 <!-- // Begin Template Header \\ -->
417 <table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin: 0px; padding: 0px; background-color: rgb(253, 253, 253);">
418 <tr>
419 <td class="headerContent">
420 <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 />
421 </td>
422
423 <td class="headerContent" width="100%" style="padding-left:10px; padding-right:20px;">
424 <div mc:edit="Header_content">
425 <h2>
426 NAME_HU
427 </h2>
428 </div>
429 </td>
430 </tr>
431 </table>
432 <!-- // End Template Header \\ -->
433 </td>
434 </tr>
435 <tr>
436 <td align="center" style="margin: 0px; padding: 0px; width: 600px; background-color: #951510">
437 <div style="font-size:1.3em; font-family:Arial; color:#FFFFFF;"><b>
438 Criterio de Aceptación.
439 </b></div>
440 </td>
441 </tr>
442 <tr>
443 <td align="center" valign="top">
444 <!-- // Begin Template Body \\ -->
445 <table border="0" cellpadding="10" cellspacing="0" width="600" style="margin: 0px; padding: 0px; width: 600px; background-color: rgb(247, 247, 247);">
446 <tr>
447 <!-- // Begin Sidebar \\ -->
448 <td valign="top" width="180" id="templateSidebar">
449 <table border="0" cellpadding="0" cellspacing="0" width="100%">
450 <tr>
451 <td valign="top">
452 </td>
453 </tr>
454 </table>
455 </td>
456 <!-- // End Sidebar \\ -->
457 <td valign="top" class="bodyContent">
458
459 <!-- // Begin Module: Standard Content \\ -->
460 <table border="0" cellpadding="10" cellspacing="0" width="600">
461 <tr>
462 <td valign="top" style="padding-left:0;">
463 <div mc:edit="std_content00">
464 <h2 class="h2">Estimad@ NAME_OWNER</h2>
465 <h3 class="h3">
466 El criterio de aceptación "NAME_CRI" ha sido aceptado por NAME_USER.
467 </h3>
468 <pre style="font-size:1.1em; font-family:Arial">
469
470Agradeciendo su atención.
471
472Ante cualquier duda estamos a su disposición.
473 </pre>
474 <br />
475 </div>
476 </td>
477 </tr>
478 </table>
479 <!-- // End Module: Standard Content \\ -->
480
481 </td>
482 </tr>
483 </table>
484 <!-- // End Template Body \\ -->
485 </td>
486 </table>
487 <br />
488 </td>
489 </tr>
490 </table>
491 </center>
492 </body>
493</html>
32 ]]></field>494 ]]></field>
33 </record>495 </record>
34496
35 <record id="template_send_email_hu_progress" model="email.template">497 <record id="template_send_email_hu_progress" model="email.template" forcecreate="True">
36 <field name="name">User Story in Progress</field>498 <field name="name">User Story in Progress</field>
37 <field name="email_from"></field>499 <field name="email_from"></field>
38 <field name="model_id" ref="user_story.model_user_story" />500 <field name="model_id" ref="user_story.model_user_story" />
@@ -42,14 +504,488 @@
42 <field name="email_to"></field>504 <field name="email_to"></field>
43 <field name="sequence">5</field>505 <field name="sequence">5</field>
44 <field name="body_html"><![CDATA[506 <field name="body_html"><![CDATA[
45 <html>507<html>
46 <head>508 <head>
47 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />509 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
48 </head>510 <title>*|MC:SUBJECT|*</title>
49 <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">511 <style type="text/css">
50 Now the "NAME_HU" User Story is Pending, processed by NAME_USER.512 /* Client-specific Styles */
51 </body>513 #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */
52 </html>514 body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
515 body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */
516
517 /* Reset Styles */
518 body{margin:0; padding:0;}
519 img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}
520 table td{border-collapse:collapse;}
521 #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;}
522
523 /* Template Styles */
524
525 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: COMMON PAGE ELEMENTS /\/\/\/\/\/\/\/\/\/\ */
526
527 /**
528 * @tab Page
529 * @section background color
530 * @tip Set the background color for your email. You may want to choose one that matches your company's branding.
531 * @theme page
532 */
533 body, #backgroundTable{
534 /*@editable*/ background-color:#FAFAFA;
535 }
536
537 /**
538 * @tab Page
539 * @section email border
540 * @tip Set the border for your email.
541 */
542 #templateContainer{
543 /*@editable*/ border:0;
544 }
545
546 /**
547 * @tab Page
548 * @section heading 1
549 * @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
550 * @style heading 1
551 */
552 h1, .h1{
553 /*@editable*/ color:#202020;
554 display:block;
555 /*@editable*/ font-family:Arial;
556 /*@editable*/ font-size:40px;
557 /*@editable*/ font-weight:bold;
558 /*@editable*/ line-height:100%;
559 margin-top:2%;
560 margin-right:0;
561 margin-bottom:1%;
562 margin-left:0;
563 /*@editable*/ text-align:left;
564 }
565
566 /**
567 * @tab Page
568 * @section heading 2
569 * @tip Set the styling for all second-level headings in your emails.
570 * @style heading 2
571 */
572 h2, .h2{
573 /*@editable*/ color:#404040;
574 display:block;
575 /*@editable*/ font-family:Arial;
576 /*@editable*/ font-size:18px;
577 /*@editable*/ font-weight:bold;
578 /*@editable*/ line-height:100%;
579 margin-top:2%;
580 margin-right:0;
581 margin-bottom:1%;
582 margin-left:0;
583 /*@editable*/ text-align:left;
584 }
585
586 /**
587 * @tab Page
588 * @section heading 3
589 * @tip Set the styling for all third-level headings in your emails.
590 * @style heading 3
591 */
592 h3, .h3{
593 /*@editable*/ color:#606060;
594 display:block;
595 /*@editable*/ font-family:Arial;
596 /*@editable*/ font-size:16px;
597 /*@editable*/ font-weight:bold;
598 /*@editable*/ line-height:100%;
599 margin-top:2%;
600 margin-right:0;
601 margin-bottom:1%;
602 margin-left:0;
603 /*@editable*/ text-align:left;
604 }
605
606 /**
607 * @tab Page
608 * @section heading 4
609 * @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
610 * @style heading 4
611 */
612 h4, .h4{
613 /*@editable*/ color:#808080;
614 display:block;
615 /*@editable*/ font-family:Arial;
616 /*@editable*/ font-size:14px;
617 /*@editable*/ font-weight:bold;
618 /*@editable*/ line-height:100%;
619 margin-top:2%;
620 margin-right:0;
621 margin-bottom:1%;
622 margin-left:0;
623 /*@editable*/ text-align:left;
624 }
625
626 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: PREHEADER /\/\/\/\/\/\/\/\/\/\ */
627
628 /**
629 * @tab Header
630 * @section preheader style
631 * @tip Set the background color for your email's preheader area.
632 * @theme page
633 */
634 #templatePreheader{
635 /*@editable*/ background-color:#FAFAFA;
636 }
637
638 /**
639 * @tab Header
640 * @section preheader text
641 * @tip Set the styling for your email's preheader text. Choose a size and color that is easy to read.
642 */
643 .preheaderContent div{
644 /*@editable*/ color:#707070;
645 /*@editable*/ font-family:Arial;
646 /*@editable*/ font-size:10px;
647 /*@editable*/ line-height:100%;
648 /*@editable*/ text-align:left;
649 }
650
651 /**
652 * @tab Header
653 * @section preheader link
654 * @tip Set the styling for your email's preheader links. Choose a color that helps them stand out from your text.
655 */
656 .preheaderContent div a:link, .preheaderContent div a:visited, /* Yahoo! Mail Override */ .preheaderContent div a .yshortcuts /* Yahoo! Mail Override */{
657 /*@editable*/ color:#336699;
658 /*@editable*/ font-weight:normal;
659 /*@editable*/ text-decoration:underline;
660 }
661
662 /**
663 * @tab Header
664 * @section social bar style
665 * @tip Set the background color and border for your email's footer social bar.
666 */
667 #social div{
668 /*@editable*/ text-align:right;
669 }
670
671 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: HEADER /\/\/\/\/\/\/\/\/\/\ */
672
673 /**
674 * @tab Header
675 * @section header style
676 * @tip Set the background color and border for your email's header area.
677 * @theme header
678 */
679 #templateHeader{
680 /*@editable*/ background-color:#FFFFFF;
681 /*@editable*/ border-bottom:5px solid #505050;
682 }
683
684 /**
685 * @tab Header
686 * @section header text
687 * @tip Set the styling for your email's header text. Choose a size and color that is easy to read.
688 */
689 .headerContent{
690 /*@editable*/ color:#202020;
691 /*@editable*/ font-family:Arial;
692 /*@editable*/ font-size:34px;
693 /*@editable*/ font-weight:bold;
694 /*@editable*/ line-height:100%;
695 /*@editable*/ padding:10px;
696 /*@editable*/ text-align:right;
697 /*@editable*/ vertical-align:middle;
698 }
699
700 /**
701 * @tab Header
702 * @section header link
703 * @tip Set the styling for your email's header links. Choose a color that helps them stand out from your text.
704 */
705 .headerContent a:link, .headerContent a:visited, /* Yahoo! Mail Override */ .headerContent a .yshortcuts /* Yahoo! Mail Override */{
706 /*@editable*/ color:#336699;
707 /*@editable*/ font-weight:normal;
708 /*@editable*/ text-decoration:underline;
709 }
710
711 #headerImage{
712 height:auto;
713 max-width:600px !important;
714 }
715
716 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: MAIN BODY /\/\/\/\/\/\/\/\/\/\ */
717
718 /**
719 * @tab Body
720 * @section body style
721 * @tip Set the background color for your email's body area.
722 */
723 #templateContainer, .bodyContent{
724 /*@editable*/ background-color:#FDFDFD;
725 }
726
727 /**
728 * @tab Body
729 * @section body text
730 * @tip Set the styling for your email's main content text. Choose a size and color that is easy to read.
731 * @theme main
732 */
733 .bodyContent div{
734 /*@editable*/ color:#505050;
735 /*@editable*/ font-family:Arial;
736 /*@editable*/ font-size:14px;
737 /*@editable*/ line-height:150%;
738 /*@editable*/ text-align:justify;
739 }
740
741 /**
742 * @tab Body
743 * @section body link
744 * @tip Set the styling for your email's main content links. Choose a color that helps them stand out from your text.
745 */
746 .bodyContent div a:link, .bodyContent div a:visited, /* Yahoo! Mail Override */ .bodyContent div a .yshortcuts /* Yahoo! Mail Override */{
747 /*@editable*/ color:#336699;
748 /*@editable*/ font-weight:normal;
749 /*@editable*/ text-decoration:underline;
750 }
751
752 .bodyContent img{
753 display:inline;
754 height:auto;
755 }
756
757 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: SIDEBAR /\/\/\/\/\/\/\/\/\/\ */
758
759 /**
760 * @tab Sidebar
761 * @section sidebar style
762 * @tip Set the background color and border for your email's sidebar area.
763 */
764 #templateSidebar{
765 /*@editable*/ background-color:#FDFDFD;
766 }
767
768 /**
769 * @tab Sidebar
770 * @section sidebar style
771 * @tip Set the background color and border for your email's sidebar area.
772 */
773 .sidebarContent{
774 /*@editable*/ border-right:1px solid #DDDDDD;
775 }
776
777 /**
778 * @tab Sidebar
779 * @section sidebar text
780 * @tip Set the styling for your email's sidebar text. Choose a size and color that is easy to read.
781 */
782 .sidebarContent div{
783 /*@editable*/ color:#505050;
784 /*@editable*/ font-family:Arial;
785 /*@editable*/ font-size:10px;
786 /*@editable*/ line-height:150%;
787 /*@editable*/ text-align:left;
788 }
789
790 /**
791 * @tab Sidebar
792 * @section sidebar link
793 * @tip Set the styling for your email's sidebar links. Choose a color that helps them stand out from your text.
794 */
795 .sidebarContent div a:link, .sidebarContent div a:visited, /* Yahoo! Mail Override */ .sidebarContent div a .yshortcuts /* Yahoo! Mail Override */{
796 /*@editable*/ color:#336699;
797 /*@editable*/ font-weight:normal;
798 /*@editable*/ text-decoration:underline;
799 }
800
801 .sidebarContent img{
802 display:inline;
803 height:auto;
804 }
805
806 /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: FOOTER /\/\/\/\/\/\/\/\/\/\ */
807
808 /**
809 * @tab Footer
810 * @section footer style
811 * @tip Set the background color and top border for your email's footer area.
812 * @theme footer
813 */
814 #templateFooter{
815 /*@editable*/ background-color:#FAFAFA;
816 /*@editable*/ border-top:3px solid #909090;
817 }
818
819 /**
820 * @tab Footer
821 * @section footer text
822 * @tip Set the styling for your email's footer text. Choose a size and color that is easy to read.
823 * @theme footer
824 */
825 .footerContent div{
826 /*@editable*/ color:#707070;
827 /*@editable*/ font-family:Arial;
828 /*@editable*/ font-size:11px;
829 /*@editable*/ line-height:125%;
830 /*@editable*/ text-align:left;
831 }
832
833 /**
834 * @tab Footer
835 * @section footer link
836 * @tip Set the styling for your email's footer links. Choose a color that helps them stand out from your text.
837 */
838 .footerContent div a:link, .footerContent div a:visited, /* Yahoo! Mail Override */ .footerContent div a .yshortcuts /* Yahoo! Mail Override */{
839 /*@editable*/ color:#336699;
840 /*@editable*/ font-weight:normal;
841 /*@editable*/ text-decoration:underline;
842 }
843
844 .footerContent img{
845 display:inline;
846 }
847
848 /**
849 * @tab Footer
850 * @section social bar style
851 * @tip Set the background color and border for your email's footer social bar.
852 * @theme footer
853 */
854 #social{
855 /*@editable*/ background-color:#FFFFFF;
856 /*@editable*/ border:0;
857 }
858
859 /**
860 * @tab Footer
861 * @section social bar style
862 * @tip Set the background color and border for your email's footer social bar.
863 */
864 #social div{
865 /*@editable*/ text-align:left;
866 }
867
868 /**
869 * @tab Footer
870 * @section utility bar style
871 * @tip Set the background color and border for your email's footer utility bar.
872 * @theme footer
873 */
874 #utility{
875 /*@editable*/ background-color:#FAFAFA;
876 /*@editable*/ border-top:0;
877 }
878
879 /**
880 * @tab Footer
881 * @section utility bar style
882 * @tip Set the background color and border for your email's footer utility bar.
883 */
884 #utility div{
885 /*@editable*/ text-align:left;
886 }
887
888 #monkeyRewards img{
889 max-width:170px !important;
890 }
891 </style>
892 </head>
893 <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
894 <center>
895 <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable">
896 <tr>
897 <td align="center" valign="top">
898 <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateContainer">
899 <tr style="margin: 0px; padding: 0px; background-color: rgb(247, 247, 247);">
900 <td align="center" valign="top">
901 <!-- // Begin Template Header \\ -->
902 <table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin: 0px; padding: 0px; background-color: rgb(253, 253, 253);">
903 <tr>
904 <td class="headerContent">
905 <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 />
906 </td>
907
908 <td class="headerContent" width="100%" style="padding-left:10px; padding-right:20px;">
909 <div mc:edit="Header_content">
910 <h2>
911 NAME_HU
912 </h2>
913 </div>
914 </td>
915 </tr>
916 </table>
917 <!-- // End Template Header \\ -->
918 </td>
919 </tr>
920 <tr>
921 <td align="center" style="margin: 0px; padding: 0px; width: 600px; background-color: #951510">
922 <div style="font-size:1.3em; font-family:Arial; color:#FFFFFF;"><b>
923 Historia de Usuario
924 </b></div>
925 </td>
926 </tr>
927 <tr>
928 <td align="center" valign="top">
929 <!-- // Begin Template Body \\ -->
930 <table border="0" cellpadding="10" cellspacing="0" width="600" style="margin: 0px; padding: 0px; width: 600px; background-color: rgb(247, 247, 247);">
931 <tr>
932 <!-- // Begin Sidebar \\ -->
933 <td valign="top" width="180" id="templateSidebar">
934 <table border="0" cellpadding="0" cellspacing="0" width="100%">
935 <tr>
936 <td valign="top">
937 </td>
938 </tr>
939 </table>
940 </td>
941 <!-- // End Sidebar \\ -->
942 <td valign="top" class="bodyContent">
943
944 <!-- // Begin Module: Standard Content \\ -->
945 <table border="0" cellpadding="10" cellspacing="0" width="600">
946 <tr>
947 <td valign="top" style="padding-left:0;">
948 <div mc:edit="std_content00">
949 <h2 class="h2">Estimad@ NAME_OWNER</h2>
950 <h3 class="h3">
951 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.
952 </h3>
953 <pre style="font-size:1.1em; font-family:Arial">
954El proceso a seguir es:
955
9561) Entrar en la base de datos de Vauxoo a través del link ubicado al final de este email.
9572) Seleccionar el botón "editar" en la Historia de Usuario.
9583) Revisar los Criterios de Aceptación.
9594) Verificar que los Criterios de Aceptación se cumplan.
9605) Una vez verificado cada criterio seleccionar la casilla "aceptar" lo que indica que se está conforme con el resultado revisado.
961
962Todos 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.
963
964
965Agradeciendo su atención.
966
967Ante cualquier duda estamos a su disposición.
968 </pre>
969 <br />
970 </div>
971 </td>
972 </tr>
973 </table>
974 <!-- // End Module: Standard Content \\ -->
975
976 </td>
977 </tr>
978 </table>
979 <!-- // End Template Body \\ -->
980 </td>
981 </table>
982 <br />
983 </td>
984 </tr>
985 </table>
986 </center>
987 </body>
988</html>
53989
54 ]]></field>990 ]]></field>
55 </record>991 </record>
56992
=== modified file 'user_story/model/user_story.py'
--- user_story/model/user_story.py 2014-03-17 21:49:54 +0000
+++ user_story/model/user_story.py 2014-03-26 20:24:07 +0000
@@ -24,6 +24,7 @@
24from openerp.tools.translate import _24from openerp.tools.translate import _
2525
26import time26import time
27import unicodedata
2728
28_US_STATE = [('draft', 'New'), ('open', 'In Progress'), (29_US_STATE = [('draft', 'New'), ('open', 'In Progress'), (
29 'pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')]30 'pending', 'Pending'), ('done', 'Done'), ('cancelled', 'Cancelled')]
@@ -82,9 +83,118 @@
82 ('userstory_id', '=', ids[0])])83 ('userstory_id', '=', ids[0])])
83 task_obj.write(cr, uid, task_ids, {84 task_obj.write(cr, uid, task_ids, {
84 'sprint_id': vals.get('sk_id')}, context=context)85 'sprint_id': vals.get('sk_id')}, context=context)
86
87 if 'accep_crit_ids' in vals:
88 ac_obj = self.pool.get('acceptability.criteria')
89 criteria = [False, False]
90 for ac in vals.get('accep_crit_ids'):
91 if ac[2] and ac[2].get('accepted', False):
92 if ac[1]:
93 ac_brw = ac_obj.browse(cr, uid, ac[1] , context=context)
94 criteria[1] = ac_brw.name
95 else:
96 criteria[1] = ac[2].get('name', False)
97
98 body = self.body_criteria(cr, uid, ids, 'template_send_email_hu', criteria[1], context)
99 hu = self.browse(cr, uid, ids[0], context=context)
100 subject = 'Se acepta Criterio de Aceptacion "%s"... en la Historia de Usuario %s' % (criteria[1][:30],hu.id)
101 self.send_mail_hu(cr, uid, ids, subject, body, hu.id, users=False, context=context)
85 return super(user_story, self).write(cr, uid, ids,102 return super(user_story, self).write(cr, uid, ids,
86 vals, context=context)103 vals, context=context)
87 104
105 def body_progress(self, cr, uid, ids, template, hu, context=None):
106 imd_obj = self.pool.get('ir.model.data')
107 template_ids = imd_obj.search(
108 cr, uid, [('model', '=', 'email.template'), ('name', '=', template)])
109 if template_ids:
110 res_id = imd_obj.read(
111 cr, uid, template_ids, ['res_id'])[0]['res_id']
112 body_html = self.pool.get('email.template').read(
113 cr, uid, res_id, ['body_html']).get('body_html')
114
115 user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0]
116 hu = self.browse(cr, uid, ids[0], context=context)
117
118 return body_html
119 else:
120 return False
121
122 def body_criteria(self, cr, uid, ids, template, criteria, context=None):
123 imd_obj = self.pool.get('ir.model.data')
124 template_ids = imd_obj.search(
125 cr, uid, [('model', '=', 'email.template'), ('name', '=', template)])
126 if template_ids:
127 res_id = imd_obj.read(
128 cr, uid, template_ids, ['res_id'])[0]['res_id']
129 body_html = self.pool.get('email.template').read(
130 cr, uid, res_id, ['body_html']).get('body_html')
131
132 user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0]
133 hu = self.browse(cr, uid, ids[0], context=context)
134
135 body_html = body_html.replace('NAME_OWNER', hu.owner)
136 body_html = body_html.replace('NAME_USER', user_id.name)
137 body_html = body_html.replace('NAME_CRI', criteria)
138 body_html = body_html.replace('NAME_HU', hu.name)
139
140 return body_html
141
142 else:
143 return False
144
145
146 def send_mail_hu(self, cr, uid, ids, subject, body, res_id, users=[], context=None):
147 if not users:
148 followers = self.read(cr, uid, ids[0], [
149 'message_follower_ids'])['message_follower_ids']
150 else:
151 followers = []
152 user_obj = self.pool.get('res.users')
153 hu = self.browse(cr, uid, res_id, context=context)
154
155 owner_name = unicodedata.normalize('NFKD', hu.owner)
156 owner_name = owner_name.encode('ASCII','ignore')
157 owner_id = user_obj.search(cr, uid, [('name','=',owner_name)], context=context)
158
159 if hu.user_id and hu.user_id.partner_id:
160 followers.append(hu.user_id.partner_id.id)
161 if hu.user_execute_id and hu.user_execute_id.partner_id:
162 followers.append(hu.user_execute_id.partner_id.id)
163 if owner_id and len(owner_id)==1:
164 user_o = user_obj.browse(cr,uid,owner_id,context=context)
165 followers.append( user_o[0].partner_id.id)
166
167 context.update({
168 'default_body': body,
169 })
170 user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0]
171
172 mail_mail = self.pool.get('mail.mail')
173 mail_id = mail_mail.create(cr, uid,
174 {
175 'model': 'user.story',
176 'res_id': res_id,
177 'subject': subject,
178 'body_html': body,
179 'auto_delete': False,
180 'email_from': user_id.email,
181 }, context=context)
182 mail_mail.send(cr, uid, [mail_id],
183 recipient_ids=followers,
184 context=context)
185
186
187 return False
188
189 def create(self, cr, uid, vals, context=None):
190 if context is None: context = {}
191 # Prevent double project creation when 'use_tasks' is checked!
192 context = dict(context, user_story_creation_in_progress=True)
193 context['name'] = "User Story / %s" % (vals['name'])
194 if vals.get('type', False) not in ('template','contract'):
195 vals['type'] = 'contract'
196 user_story_id = super(user_story, self).create(cr, uid, vals, context=context)
197 return user_story_id
88 198
89 _columns = {199 _columns = {
90 'name': fields.char('Title', size=255, required=True, readonly=False,200 'name': fields.char('Title', size=255, required=True, readonly=False,
@@ -144,6 +254,11 @@
144 return self.write(cr, uid, ids, {'state': 'open'}, context=context)254 return self.write(cr, uid, ids, {'state': 'open'}, context=context)
145255
146 def do_pending(self, cr, uid, ids, context=None):256 def do_pending(self, cr, uid, ids, context=None):
257 body = self.body_criteria(cr, uid, ids, 'template_send_email_hu_progress', 'hu', context)
258 hu_model = self.pool.get('user.story')
259 hu = hu_model.browse(cr, uid, ids[0], context=context)
260 subject = 'The User Story with ID %s, "%s...", is now in Pending state' % ( hu.id, hu.name[:30] )
261 self.send_mail_hu(cr, uid, ids, subject, body, hu.id, users=True, context=context)
147 return self.write(cr, uid, ids, {'state': 'pending'}, context=context)262 return self.write(cr, uid, ids, {'state': 'pending'}, context=context)
148263
149 def do_done(self, cr, uid, ids, context=None):264 def do_done(self, cr, uid, ids, context=None):
150265
=== modified file 'user_story/view/userstory_view.xml'
--- user_story/view/userstory_view.xml 2014-03-14 21:54:48 +0000
+++ user_story/view/userstory_view.xml 2014-03-26 20:24:07 +0000
@@ -101,8 +101,6 @@
101 <field name="name"/>101 <field name="name"/>
102 <field name="scenario"/>102 <field name="scenario"/>
103 <field name="accepted"/>103 <field name="accepted"/>
104 <field name="development"/>
105 <field name="difficulty"/>
106 </tree>104 </tree>
107 </field>105 </field>
108 </page>106 </page>
109107
=== modified file 'user_story_long_term/__openerp__.py'
--- user_story_long_term/__openerp__.py 2014-03-25 15:19:09 +0000
+++ user_story_long_term/__openerp__.py 2014-03-26 20:24:07 +0000
@@ -50,7 +50,7 @@
50 #'security/ir.model.access.csv',50 #'security/ir.model.access.csv',
51 'user_story_long_term_view.xml',51 'user_story_long_term_view.xml',
52 'workflow/user_story_long_term_workflow.xml',52 'workflow/user_story_long_term_workflow.xml',
53 'data/user_story_template.xml',53 #'data/user_story_template.xml',
54 #'wizard/user_story_compute_phases_view.xml',54 #'wizard/user_story_compute_phases_view.xml',
55 #'wizard/user_story_compute_tasks_view.xml',55 #'wizard/user_story_compute_tasks_view.xml',
56 ],56 ],
5757
=== modified file 'user_story_long_term/user_story_long_term.py'
--- user_story_long_term/user_story_long_term.py 2014-03-25 15:15:07 +0000
+++ user_story_long_term/user_story_long_term.py 2014-03-26 20:24:07 +0000
@@ -232,121 +232,6 @@
232class user_story(osv.Model):232class user_story(osv.Model):
233 _inherit = 'user.story'233 _inherit = 'user.story'
234234
235 def body_progress(self, cr, uid, ids, template, hu, context=None):
236 imd_obj = self.pool.get('ir.model.data')
237 template_ids = imd_obj.search(
238 cr, uid, [('model', '=', 'email.template'), ('name', '=', template)])
239 if template_ids:
240 res_id = imd_obj.read(
241 cr, uid, template_ids, ['res_id'])[0]['res_id']
242 body_html = self.pool.get('email.template').read(
243 cr, uid, res_id, ['body_html']).get('body_html')
244
245 user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0]
246 hu = self.browse(cr, uid, ids[0], context=context)
247
248 #body_html = body_html.replace('NAME_HU',str(hu.id))
249 return body_html
250 else:
251 return False
252
253
254 def do_pending(self, cr, uid, ids, context=None):
255
256 body = self.body_criteria(cr, uid, ids, 'template_send_email_hu_progress', 'hu', context)
257 hu_model = self.pool.get('user.story')
258 hu = hu_model.browse(cr, uid, ids[0], context=context)
259 subject = 'The User Story with ID %s, "%s...", is now in Pending state' % ( hu.id, hu.name[:30] )
260 self.send_mail_hu(cr, uid, ids, subject, body, hu.id, users=True, context=context)
261
262 return super(user_story, self).do_pending(cr, uid, ids, context=context)
263
264 def body_criteria(self, cr, uid, ids, template, criteria, context=None):
265 imd_obj = self.pool.get('ir.model.data')
266 template_ids = imd_obj.search(
267 cr, uid, [('model', '=', 'email.template'), ('name', '=', template)])
268 if template_ids:
269 res_id = imd_obj.read(
270 cr, uid, template_ids, ['res_id'])[0]['res_id']
271 body_html = self.pool.get('email.template').read(
272 cr, uid, res_id, ['body_html']).get('body_html')
273
274 user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0]
275 hu = self.browse(cr, uid, ids[0], context=context)
276
277 body_html = body_html.replace('NAME_USER', user_id.name)
278 body_html = body_html.replace('NAME_CRI', criteria)
279 body_html = body_html.replace('NAME_HU', hu.name)
280
281 return body_html
282
283 else:
284 return False
285
286
287 def send_mail_hu(self, cr, uid, ids, subject, body, res_id, users=[], context=None):
288 if not users:
289 followers = self.read(cr, uid, ids[0], [
290 'message_follower_ids'])['message_follower_ids']
291 else:
292 followers = []
293 user_obj = self.pool.get('res.users')
294 hu = self.browse(cr, uid, res_id, context=context)
295
296 owner_name = unicodedata.normalize('NFKD', hu.owner)
297 owner_name = owner_name.encode('ASCII','ignore')
298 owner_id = user_obj.search(cr, uid, [('name','=',owner_name)], context=context)
299
300 if hu.user_id and hu.user_id.partner_id:
301 followers.append(hu.user_id.partner_id.id)
302 if hu.user_execute_id and hu.user_execute_id.partner_id:
303 followers.append(hu.user_execute_id.partner_id.id)
304 if owner_id and len(owner_id)==1:
305 user_o = user_obj.browse(cr,uid,owner_id,context=context)
306 followers.append( user_o[0].partner_id.id)
307
308 context.update({
309 'default_body': body,
310 })
311 user_id = self.pool.get('res.users').browse(cr,uid,[uid],context=context)[0]
312
313 mail_mail = self.pool.get('mail.mail')
314 mail_id = mail_mail.create(cr, uid,
315 {
316 'model': 'user.story',
317 'res_id': res_id,
318 'subject': subject,
319 'body_html': body,
320 'auto_delete': False,
321 'email_from': user_id.email,
322 }, context=context)
323 mail_mail.send(cr, uid, [mail_id],
324 recipient_ids=followers,
325 context=context)
326
327
328 return False
329
330 def write(self, cr, uid, ids, vals, context=None):
331 res = super(user_story, self).write(cr, uid, ids, vals, context=context)
332
333 if 'accep_crit_ids' in vals:
334 ac_obj = self.pool.get('acceptability.criteria')
335 criteria = [False, False]
336 for ac in vals.get('accep_crit_ids'):
337 if ac[2] and ac[2].get('accepted', False):
338 if ac[1]:
339 ac_brw = ac_obj.browse(cr, uid, ac[1] , context=context)
340 criteria[1] = ac_brw.name
341 else:
342 criteria[1] = ac[2].get('name', False)
343
344 body = self.body_criteria(cr, uid, ids, 'template_send_email_hu', criteria[1], context)
345 hu = self.browse(cr, uid, ids[0], context=context)
346 subject = 'Accepted Criteria - "%s"... in User Story with ID %s' % (criteria[1][:30],hu.id)
347 self.send_mail_hu(cr, uid, ids, subject, body, hu.id, users=False, context=context)
348 return res
349
350 def _phase_count(self, cr, uid, ids, field_name, arg, context=None):235 def _phase_count(self, cr, uid, ids, field_name, arg, context=None):
351 res = dict.fromkeys(ids, 0)236 res = dict.fromkeys(ids, 0)
352 phase_ids = self.pool.get('user.story.phase').search(cr, uid, [('user_story_id', 'in', ids)])237 phase_ids = self.pool.get('user.story.phase').search(cr, uid, [('user_story_id', 'in', ids)])