portal_page.xml 49.5 KB
Newer Older
Arturo Jasso Origel committed
1 2 3 4 5
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="portal_ticket_page_support" name="Ticket Portal Template" inherit_id="portal.portal_sidebar" primary="True">
        <xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
            <div class="row mt16 o_portal_ticket_sidebar">
6
                <!-- Sidebar 
Arturo Jasso Origel committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
                <t t-call="portal.portal_record_sidebar">
                    <t t-set="classes" t-value="'col-12 col-lg flex-lg-grow-0 d-print-none'" />
                    <t t-set="title">
                        <h2 class="mb-0">
                            <b t-if="soporte" t-field="soporte.name" />
                            <b t-else="" >TICKET</b>
                        </h2>
                    </t>

                    <t t-set="entries">
                        <ul class="list-group list-group-flush flex-wrap flex-row flex-lg-column">
                            <li class="list-group-item flex-grow-1">
                                <div class="o_download_pdf btn-toolbar flex-sm-nowrap">
                                    <div class="btn-group flex-grow-1 mr-1 mb-1">
                                        <a class="btn btn-secondary btn-block o_download_btn" t-att-href="soporte.get_portal_url(report_type='pdf', download=True)" title="Download"><i class="fa fa-download" /> Descargar</a>
                                    </div>
                                </div>
                            </li>
                            <li t-if="soporte.user_id" class="list-group-item flex-grow-1">
                                <div class="small mb-1"><strong class="text-muted">Contacto:</strong></div>
                                <div class="row">
                                    <div class="col flex-grow-0 pr-2">
                                        <img t-if="soporte.user_id.image_128" class="rounded-circle mt-1 o_portal_contact_img" t-att-src="image_data_uri(soporte.user_id.image_128)" alt="Contact" />
                                        <img t-else="" class="rounded-circle mt-1 o_portal_contact_img" src="/web/static/src/img/user_menu_avatar.png" alt="Contact" />
                                    </div>
                                    <div class="col pl-0" style="min-width: 150px;">
                                        <span t-field="soporte.user_id" t-options='{"widget": "contact", "fields": ["name", "phone"], "no_marker": True}' />
                                        <a href="#discussion" class="small"><i class="fa fa-comment"></i> Mandar Mensaje</a>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </t>
40
                </t>-->
Arturo Jasso Origel committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

                <!-- Page Content -->
                <div id="ticket_content" class="col-12 col-lg justify-content-end">
                    <div t-attf-class="card #{'pb-5' if report_type == 'html' else ''}">
                        <div t-call="helpdesk_morsa.helpdesk_ticket_portal_content_support" />
                    </div>

                    <!-- chatter -->
                    <div id="ticket_communication" class="mt-4">
                        <h2>Historia</h2>
                        <t t-call="portal.message_thread">
                            <t t-set="object" t-value="soporte" />
                        </t>
                    </div>
                </div>
            </div>
        </xpath>
    </template>


    <template id="helpdesk_ticket_portal_content_support" name="Helpdesk Ticket Portal Content">
        <!-- Intro -->

        <div id="introduction" t-attf-class="pb-2 pt-3 #{'card-header bg-white' if report_type == 'html' else ''}">
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
            <div class="row">
                <div class="col-sm-12 col-md-6 col-lg-6">
                    <h2 class="my-0">
                        <strong><em t-esc="soporte.name" /></strong>
                    </h2>
                </div>
                <div class="col-sm-12 col-md-6 col-lg-6 text-right">
                    <div class="row">
                        <div class="col-sm-12 col-md-6 col-lg-8">
                            <form action="/cerrar-ticket" t-if="soporte.stage_id.name not in ['Hecho','Cerrado','Cancelado']" class="oe_inline">
                                <input type="hidden" name="option" id="option" value="soporte"/>
                                <input type="hidden" name="ticket_id" id="ticket_id" t-att-value="soporte.id"/>
                                <button type="submit" id="close_ticket" class="btn btn-primary mt-2 rounded">Cerrar Ticket</button>
                            </form>
                        </div>
                        <div class="col-sm-12 col-md-6 col-lg-4">
                            <form action="/cancel-ticket" t-if="soporte.stage_id.name not in ['Hecho','Cerrado','Cancelado']" class="oe_inline">
                                <input type="hidden" name="option" id="option" value="soporte"/>
                                <input type="hidden" name="ticket_id" id="ticket_id" t-att-value="soporte.id"/>
                                <button type="submit" id="cancle_ticket" class="btn btn-primary mt-2 rounded">Cancelar Ticket</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
Arturo Jasso Origel committed
90 91 92 93
        </div>
        <div t-attf-class="#{'card-body' if report_type == 'html' else ''}">
            <div id="informations">
                <div class="row">
94
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
95 96 97 98 99 100 101 102 103
                        <div class="row">
                            <div class="col-6">
                                <strong>Tipo de Ticket: </strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.ticket_type" />
                            </div>
                        </div>
                    </div>
104
                    <div t-if="soporte.create_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
105 106 107 108 109 110 111 112 113 114 115
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de creación:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.create_date" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
116
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
117 118 119 120 121 122 123 124 125
                        <div class="row">
                            <div class="col-6">
                                <strong>Última actualización:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.write_date" />
                            </div>
                        </div>
                    </div>
126
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
127 128 129 130 131 132 133 134 135 136 137 138
                        <div class="row">
                            <div class="col-6">
                                <strong>Nombre:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.person_name" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    
139
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
140 141 142 143 144 145 146 147 148 149 150
                        <div class="row">
                            <div class="col-6">
                                <strong>Correo electrónico:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.email" />
                            </div>
                        </div>
                    </div>
                </div>
                
151
               
Arturo Jasso Origel committed
152
                <div class="row">
153
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
154 155 156 157 158 159 160 161 162
                        <div class="row">
                            <div class="col-6">
                                <strong>Prioridad:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.priority" />
                            </div>
                        </div>
                    </div>
163
                    <div t-if="soporte.close_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
164 165 166 167 168 169 170 171 172 173 174
                        <div class="row">
                            <div class="col-6">
                                <strong>Cerrado por: </strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.close_by" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
175
                    <div t-if="soporte.cancel_date" class="col-sm-12 col-md-6 col-lg-6">
176
                        <div class="row mb-3 ">
Arturo Jasso Origel committed
177 178 179 180 181 182 183 184
                            <div class="col-6">
                                <strong>Fecha de cancelación:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.cancel_date" />
                            </div>
                        </div>
                    </div>
185
                    <div t-if="soporte.cancel_by" class="col-sm-12 col-md-6 col-lg-6">
186
                        <div class="row mb-3 ">
Arturo Jasso Origel committed
187 188 189 190 191 192 193 194 195 196
                            <div class="col-6">
                                <strong>Cancelado por:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.cancel_by" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
197
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
198
                        <div class="row mb-3 ">
Arturo Jasso Origel committed
199 200 201 202 203 204 205 206
                            <div class="col-6">
                                <strong>Estado:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.stage_id" />
                            </div>
                        </div>
                    </div>
207
                    <div t-if="soporte.cancel_reason" class="mb-3 col-sm-12 col-md-6 col-lg-6">
208
                        <div class="row mb-3 ">
Arturo Jasso Origel committed
209 210 211 212 213 214 215 216 217
                            <div class="col-6">
                                <strong>Razón de cancelación:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.cancel_reason" />
                            </div>
                        </div>
                    </div>
                </div>
218 219 220 221 222 223 224 225 226 227 228 229
                <div class="row">
                    <div t-if="soporte.close_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de cierre</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="soporte.close_date" />
                            </div>
                        </div>
                    </div>
                </div>
Arturo Jasso Origel committed
230 231 232 233 234 235 236 237 238 239 240 241
                <t t-if="soporte.comment">
                    <div class="row">
                        <div class="mb-3 col-12">
                            <strong>Comentario de cierre:</strong>
                        </div>
                    </div>
                    <div class="row">
                        <div class="mb-3 col-12">
                            <span t-field="soporte.comment" />
                        </div>
                    </div>
                </t>
242

Arturo Jasso Origel committed
243 244 245
                <t t-if="soporte.description">
                    <div class="row">
                        <div class="mb-3 col-12">
246
                            <strong>Descripción del problema:</strong>
Arturo Jasso Origel committed
247 248 249 250 251 252 253 254
                        </div>
                    </div>
                    <div class="row">
                        <div class="mb-3 col-12">
                            <span t-field="soporte.description" />
                        </div>
                    </div>
                </t>
255 256 257 258 259 260 261 262 263 264 265 266
                <t t-if="soporte.descripcion_solution">
                    <div class="row">
                        <div class="mb-3 col-12">
                            <strong>Descripción de solución:</strong>
                        </div>
                    </div>
                    <div class="row">
                        <div class="mb-3 col-12">
                            <span t-field="soporte.descripcion_solution" />
                        </div>
                    </div>
                </t>
Arturo Jasso Origel committed
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
                <t t-if="soporte.priority_new and soporte.customer_comment">
                    <div class="row">
                        <div class="mb-3 col-6">
                            <div class="row">
                                <div class="col-6">
                                    <strong>Calificación del cliente:</strong>
                                </div>
                                <div class="col-6">
                                    <span class="float-right" title="Rating" role="img" t-attf-aria-label="Rating: #{soporte.priority_new} on 3">
                                        <t t-foreach="range(2, 7)" t-as="i">
                                            <span t-attf-class="fa fa-lg fa-star#{'' if i &lt;= int(soporte.priority_new) else '-o'}" />
                                        </t>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="mb-3 col-6">
                            <div class="row">
                                <div class="col-6">
                                    <strong>Comentario del cliente:</strong>
                                </div>
                                <div class="col-6">
                                    <span t-field="soporte.customer_comment" />
                                </div>
                            </div>
                        </div>
                    </div>
                </t>
            </div>
        </div>
    </template>

    <template id="portal_ticket_page_erp" name="Ticket Portal Template" inherit_id="portal.portal_sidebar" primary="True">
        <xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
            <div class="row mt16 o_portal_ticket_sidebar">
302
                <!-- Sidebar 
Arturo Jasso Origel committed
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
                <t t-call="portal.portal_record_sidebar">
                    <t t-set="classes" t-value="'col-12 col-lg flex-lg-grow-0 d-print-none'" />
                    <t t-set="title">
                        <h2 class="mb-0">
                            <b t-if="asistencia" t-field="asistencia.name" />
                            <b t-else="" >TICKET</b>
                        </h2>
                    </t>

                    <t t-set="entries">
                        <ul class="list-group list-group-flush flex-wrap flex-row flex-lg-column">
                            <li class="list-group-item flex-grow-1">
                                <div class="o_download_pdf btn-toolbar flex-sm-nowrap">
                                    <div class="btn-group flex-grow-1 mr-1 mb-1">
                                        <a class="btn btn-secondary btn-block o_download_btn" t-att-href="asistencia.get_portal_url(report_type='pdf', download=True)" title="Download"><i class="fa fa-download" /> Descargar</a>
                                    </div>
                                </div>
                            </li>
                            <li t-if="asistencia.user_id" class="list-group-item flex-grow-1">
                                <div class="small mb-1"><strong class="text-muted">Contacto</strong></div>
                                <div class="row">
                                    <div class="col flex-grow-0 pr-2">
                                        <img t-if="asistencia.user_id.image_128" class="rounded-circle mt-1 o_portal_contact_img" t-att-src="image_data_uri(asistencia.user_id.image_128)" alt="Contact" />
                                        <img t-else="" class="rounded-circle mt-1 o_portal_contact_img" src="/web/static/src/img/user_menu_avatar.png" alt="Contact" />
                                    </div>
                                    <div class="col pl-0" style="min-width: 150px;">
                                        <span t-field="asistencia.user_id" t-options='{"widget": "contact", "fields": ["name", "phone"], "no_marker": True}' />
                                        <a href="#discussion" class="small"><i class="fa fa-comment"></i> Mandar Mensaje</a>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </t>
336
                </t>-->
Arturo Jasso Origel committed
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360

                <!-- Page Content -->
                <div id="ticket_content" class="col-12 col-lg justify-content-end">
                    <div t-attf-class="card #{'pb-5' if report_type == 'html' else ''}">
                        <div t-call="helpdesk_morsa.helpdesk_ticket_portal_content_erp" />
                    </div>

                    <!-- chatter -->
                    <div id="ticket_communication" class="mt-4">
                        <h2>Historial: </h2>
                        <t t-call="portal.message_thread">
                            <t t-set="object" t-value="asistencia" />
                        </t>
                    </div>
                </div>
            </div>
        </xpath>
    </template>


    <template id="helpdesk_ticket_portal_content_erp" name="Helpdesk Ticket Portal Content Erp">
        <!-- Intro -->

        <div id="introduction" t-attf-class="pb-2 pt-3 #{'card-header bg-white' if report_type == 'html' else ''}">
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385
            <div class="row">
                <div class="col-sm-12 col-md-6 col-lg-6">
                    <h2 class="my-0">
                        <strong><em t-esc="asistencia.name" /></strong>
                    </h2>
                </div>
                <div class="col-sm-12 col-md-6 col-lg-6 text-right">
                    <div class="row">
                        <div class="col-sm-12 col-md-6 col-lg-8">
                            <form action="/cerrar-ticket" t-if="asistencia.stage_id.name not in ['Hecho','Cerrado','Cancelado']" class="oe_inline">
                                <input type="hidden" name="option" id="option" value="erp"/>
                                <input type="hidden" name="ticket_id" id="ticket_id" t-att-value="asistencia.id"/>
                                <button type="submit" id="close_ticket" class="btn btn-primary mt-2 rounded">Cerrar Ticket</button>
                            </form>
                        </div>
                        <div class="col-sm-12 col-md-6 col-lg-4">
                            <form action="/cancel-ticket" t-if="asistencia.stage_id.name not in ['Hecho','Cerrado','Cancelado']" class="oe_inline">
                                <input type="hidden" name="option" id="option" value="erp"/>
                                <input type="hidden" name="ticket_id" id="ticket_id" t-att-value="asistencia.id"/>
                                <button type="submit" id="cancle_ticket" class="btn btn-primary mt-2 rounded">Cancelar Ticket</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
Arturo Jasso Origel committed
386 387 388 389
        </div>
        <div t-attf-class="#{'card-body' if report_type == 'html' else ''}">
            <div id="informations">
                <div class="row">
390
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
391 392 393 394 395 396 397 398 399
                        <div class="row">
                            <div class="col-6">
                                <strong>Tipo de Ticket:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.ticket_type" />
                            </div>
                        </div>
                    </div>
400
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
401 402 403 404 405 406 407 408 409 410 411
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de creación:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.create_date" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
412
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
413 414 415 416 417 418 419 420 421
                        <div class="row">
                            <div class="col-6">
                                <strong>Última actualización:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.write_date" />
                            </div>
                        </div>
                    </div>
422
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
423 424 425 426 427 428 429 430 431 432 433
                        <div class="row">
                            <div class="col-6">
                                <strong>Nombre:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.person_name" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
434
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
435 436 437 438 439 440 441 442 443 444 445
                        <div class="row">
                            <div class="col-6">
                                <strong>Correo electrónico:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.email" />
                            </div>
                        </div>
                    </div>
                </div>
                
446
               
Arturo Jasso Origel committed
447
                <div class="row">
448
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
449 450 451 452 453 454 455 456 457
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de respuesta:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.replied_date" />
                            </div>
                        </div>
                    </div>
458
                    <div t-if="asistencia.close_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
459 460 461 462 463 464 465 466 467 468 469
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de cierre:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.close_date" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
470
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
471 472 473 474 475 476 477 478 479
                        <div class="row">
                            <div class="col-6">
                                <strong>Prioridad:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.priority" />
                            </div>
                        </div>
                    </div>
480
                    <div t-if="asistencia.close_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
481 482 483 484 485 486 487 488 489 490 491
                        <div class="row">
                            <div class="col-6">
                                <strong>Cerrado por:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.close_by" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
492
                    <div t-if="asistencia.cancel_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
493 494 495 496 497 498 499 500 501
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de cancelación:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.cancel_date" />
                            </div>
                        </div>
                    </div>
502
                    <div t-if="asistencia.cancel_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
503 504 505 506 507 508 509 510 511 512 513
                        <div class="row">
                            <div class="col-6">
                                <strong>Cancelado por:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.cancel_by" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
514
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
515 516 517 518 519 520 521 522 523
                        <div class="row">
                            <div class="col-6">
                                <strong>Estado:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.stage_id" />
                            </div>
                        </div>
                    </div>
524
                    <div t-if="asistencia.cancel_reason" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
525 526 527 528 529 530 531 532 533 534
                        <div class="row">
                            <div class="col-6">
                                <strong>Razón de cancelación:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.cancel_reason" />
                            </div>
                        </div>
                    </div>
                </div>
535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622

                <div class="row">
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
                        <div class="row">
                            <div class="col-6">
                                <strong>Tipo de asistencia:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.erp_type" />
                            </div>
                        </div>
                    </div>
                    <div t-if="asistencia.erp_id" class="mb-3 col-sm-12 col-md-6 col-lg-6">
                        <div class="row">
                            <div class="col-6">
                                <strong>Módulo:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.erp_id.name" />
                            </div>
                        </div>
                    </div>
                    <div t-if="asistencia.warehouse_id" class="mb-3 col-sm-12 col-md-6 col-lg-6">
                        <div class="row">
                            <div class="col-6">
                                <strong>Sucursal:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.warehouse_id.name" />
                            </div>
                        </div>
                    </div>
                    <div t-if="asistencia.module_route" class="mb-3 col-sm-12 col-md-6 col-lg-6">
                        <div class="row">
                            <div class="col-6">
                                <strong>Ruta de la transacción:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.module_route" />
                            </div>
                        </div>
                    </div>
                    <div t-if="asistencia.process_text" class="mb-3 col-sm-12 col-md-6 col-lg-6">
                        <div class="row">
                            <div class="col-6">
                                <strong>¿En que proceso utilizas la transacción?</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.process_text" />
                            </div>
                        </div>
                    </div>
                    <div t-if="asistencia.required_validation" class="mb-3 col-sm-12 col-md-6 col-lg-6">
                        <div class="row">
                            <div class="col-6">
                                <strong>Cuales son las validaciones que se requieren</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.required_validation" />
                            </div>
                        </div>
                    </div>
                    <div t-if="asistencia.common_scenery" class="mb-3 col-sm-12 col-md-6 col-lg-6">
                        <div class="row">
                            <div class="col-6">
                                <strong>¿Qué escenarios son comunes a trabajar con esta transacción?</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.common_scenery" />
                            </div>
                        </div>
                    </div>
                    <div t-if="asistencia.module_impact" class="mb-3 col-sm-12 col-md-6 col-lg-6">
                        <div class="row">
                            <div class="col-6">
                                <strong>¿Tu solicitud, impacta de algún modo a algún otro Módulo?</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="asistencia.module_impact" />
                            </div>
                        </div>
                    </div>
                </div>
                




Arturo Jasso Origel committed
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637
                <t t-if="asistencia.comment">
                    <div class="row">
                        <div class="mb-3 col-12">
                            <strong>Comentario de cierre:</strong>
                        </div>
                    </div>
                    <div class="row">
                        <div class="mb-3 col-12">
                            <span t-field="asistencia.comment" />
                        </div>
                    </div>
                </t>
                <t t-if="asistencia.description">
                    <div class="row">
                        <div class="mb-3 col-12">
638
                            <strong>Descripción del problema:</strong>
Arturo Jasso Origel committed
639 640 641 642 643 644 645 646
                        </div>
                    </div>
                    <div class="row">
                        <div class="mb-3 col-12">
                            <span t-field="asistencia.description" />
                        </div>
                    </div>
                </t>
647 648 649 650 651 652 653 654 655 656 657 658
                <t t-if="asistencia.descripcion_solution">
                    <div class="row">
                        <div class="mb-3 col-12">
                            <strong>Descripción de la solución:</strong>
                        </div>
                    </div>
                    <div class="row">
                        <div class="mb-3 col-12">
                            <span t-field="asistencia.descripcion_solution" />
                        </div>
                    </div>
                </t>
Arturo Jasso Origel committed
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693
                <t t-if="asistencia.priority_new and asistencia.customer_comment">
                    <div class="row">
                        <div class="mb-3 col-6">
                            <div class="row">
                                <div class="col-6">
                                    <strong>Calificación:</strong>
                                </div>
                                <div class="col-6">
                                    <span class="float-right" title="Rating" role="img" t-attf-aria-label="Rating: #{asistencia.priority_new} on 3">
                                        <t t-foreach="range(2, 7)" t-as="i">
                                            <span t-attf-class="fa fa-lg fa-star#{'' if i &lt;= int(asistencia.priority_new) else '-o'}" />
                                        </t>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="mb-3 col-6">
                            <div class="row">
                                <div class="col-6">
                                    <strong>Comentario:</strong>
                                </div>
                                <div class="col-6">
                                    <span t-field="asistencia.customer_comment" />
                                </div>
                            </div>
                        </div>
                    </div>
                </t>
            </div>
        </div>
    </template>

    <template id="portal_ticket_page_911" name="Ticket Portal Template" inherit_id="portal.portal_sidebar" primary="True">
        <xpath expr="//div[hasclass('o_portal_sidebar')]" position="inside">
            <div class="row mt16 o_portal_ticket_sidebar">
694
                <!-- Sidebar
Arturo Jasso Origel committed
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735
                <t t-call="portal.portal_record_sidebar">
                    <t t-set="classes" t-value="'col-12 col-lg flex-lg-grow-0 d-print-none'" />
                    <t t-set="title">
                        <h2 class="mb-0">
                            <b t-if="ti" t-field="ti.name" />
                            <b t-else="" >TICKET</b>
                        </h2>
                    </t>

                    <t t-set="entries">
                        <ul class="list-group list-group-flush flex-wrap flex-row flex-lg-column">
                            <li class="list-group-item flex-grow-1">
                                <div class="o_download_pdf btn-toolbar flex-sm-nowrap">
                                    <div class="btn-group flex-grow-1 mr-1 mb-1">
                                        <a class="btn btn-secondary btn-block o_download_btn" t-att-href="ti.get_portal_url(report_type='pdf', download=True)" title="Download"><i class="fa fa-download" /> Descargar</a>
                                    </div>
                                </div>
                            </li>
                            <li class="list-group-item flex-grow-1">
                                <div class="small mb-1"><strong class="text-muted">Contacto Directo:</strong></div>
                                <div class="row">
                                    <div class="col flex-grow-0 pr-2">      
                                        <img class="mt-1 o_portal_contact_img" src="/helpdesk_morsa/static/src/img/7620483611582823579.svg"/>
                                    </div>
                                    <div class="col pl-0" style="min-width: 150px;">
                                        <span>Jonathan Soto, </span>
                                    </div>
                                    <div class="col pl-0" style="min-width: 150px;">
                                        <span>33 3815 5695</span>
                                    </div>
                                </div>

                                <t t-set="emg" t-value="ti.create_date + datetime.timedelta(minutes=10)"/>
                                <t t-set="dt_now" t-value="datetime.datetime.now()"/>
                                <div class="row" >
                                    <t t-if="dt_now >= emg">
                                    <div class="col flex-grow-0 pr-2">      
                                        <img class="mt-1 o_portal_contact_img" src="/helpdesk_morsa/static/src/img/7620483611582823579.svg"/>
                                    </div>
                                    <div class="col pl-0" style="min-width: 150px;">
                                        <span>Heber Carvajal, </span>
736
                                       
Arturo Jasso Origel committed
737 738 739 740 741 742 743 744 745
                                    </div>
                                    <div class="col pl-0" style="min-width: 150px;">
                                        <span>33 1600 8962</span>
                                    </div>
                                    </t>
                                </div>
                            </li>
                        </ul>
                    </t>
746
                </t> -->
Arturo Jasso Origel committed
747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770

                <!-- Page Content -->
                <div id="ticket_content" class="col-12 col-lg justify-content-end">
                    <div t-attf-class="card #{'pb-5' if report_type == 'html' else ''}">
                        <div t-call="helpdesk_morsa.helpdesk_ticket_portal_content_911" />
                    </div>

                    <!-- chatter -->
                    <div id="ticket_communication" class="mt-4">
                        <h2>Historial:</h2>
                        <t t-call="portal.message_thread">
                            <t t-set="object" t-value="ti" />
                        </t>
                    </div>
                </div>
            </div>
        </xpath>
    </template>


    <template id="helpdesk_ticket_portal_content_911" name="Helpdesk Ticket Portal Content TI 911">
        <!-- Intro -->

        <div id="introduction" t-attf-class="pb-2 pt-3 #{'card-header bg-white' if report_type == 'html' else ''}">
771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795
            <div class="row">
                <div class="col-sm-12 col-md-6 col-lg-6">
                    <h2 class="my-0">
                        <strong><em t-esc="ti.name" /></strong>
                    </h2>
                </div>
                <div class="col-sm-12 col-md-6 col-lg-6 text-right">
                    <div class="row">
                        <div class="col-sm-12 col-md-6 col-lg-8">
                            <form action="/cerrar-ticket" t-if="ti.stage_id.name not in ['Hecho','Cerrado','Cancelado']" class="oe_inline">
                                <input type="hidden" name="option" id="option" value="911"/>
                                <input type="hidden" name="ticket_id" id="ticket_id" t-att-value="ti.id"/>
                                <button type="submit" id="close_ticket" class="btn btn-primary mt-2 rounded">Cerrar Ticket</button>
                            </form>
                        </div>
                        <div class="col-sm-12 col-md-6 col-lg-4">
                            <form action="/cancel-ticket" t-if="ti.stage_id.name not in ['Hecho','Cerrado','Cancelado']" class="oe_inline">
                                <input type="hidden" name="option" id="option" value="911"/>
                                <input type="hidden" name="ticket_id" id="ticket_id" t-att-value="ti.id"/>
                                <button type="submit" id="cancle_ticket" class="btn btn-primary mt-2 rounded">Cancelar Ticket</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
Arturo Jasso Origel committed
796 797 798 799
        </div>
        <div t-attf-class="#{'card-body' if report_type == 'html' else ''}">
            <div id="informations">
                <div class="row">
800
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
801 802 803 804 805 806 807 808 809
                        <div class="row">
                            <div class="col-6">
                                <strong>Tipo de Ticket:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.ticket_type" />
                            </div>
                        </div>
                    </div>
810
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
811 812 813 814 815 816 817 818 819 820 821
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de creación</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.create_date" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
822
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
823 824 825 826 827 828 829 830 831
                        <div class="row">
                            <div class="col-6">
                                <strong>Última actualización:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.write_date" />
                            </div>
                        </div>
                    </div>
832
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
833 834 835 836 837 838 839 840 841 842 843
                        <div class="row">
                            <div class="col-6">
                                <strong>Nombre:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.person_name" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
844
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
845 846 847 848 849 850 851 852 853
                        <div class="row">
                            <div class="col-6">
                                <strong>Tipo de incidencia:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.incidence_type" />
                            </div>
                        </div>
                    </div>
854
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
855 856 857 858 859 860 861 862 863 864 865 866
                        <div class="row">
                            <div class="col-6">
                                <strong>Correo electrónico:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.email" />
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="row">
867
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
868 869 870 871 872 873 874 875 876
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de respuesta:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.replied_date" />
                            </div>
                        </div>
                    </div>
877
                    <div t-if="ti.close_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
878 879 880 881 882 883 884 885 886 887 888
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de cierre:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.close_date" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
889
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
890 891 892 893 894 895 896 897 898
                        <div class="row">
                            <div class="col-6">
                                <strong>Prioridad:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.priority" />
                            </div>
                        </div>
                    </div>
899
                    <div t-if="ti.close_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
900 901 902 903 904 905 906 907 908 909 910
                        <div class="row">
                            <div class="col-6">
                                <strong>Cerrado por:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.close_by" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
911
                    <div t-if="ti.cancel_date" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
912 913 914 915 916 917 918 919 920
                        <div class="row">
                            <div class="col-6">
                                <strong>Fecha de cancelación:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.cancel_date" />
                            </div>
                        </div>
                    </div>
921
                    <div t-if="ti.cancel_by" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
922 923 924 925 926 927 928 929 930 931 932
                        <div class="row">
                            <div class="col-6">
                                <strong>Cancelado por:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.cancel_by" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
933
                    <div class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
934 935 936 937 938 939 940 941 942
                        <div class="row">
                            <div class="col-6">
                                <strong>Estado:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.stage_id" />
                            </div>
                        </div>
                    </div>
943
                    <div t-if="ti.cancel_reason" class="mb-3 col-sm-12 col-md-6 col-lg-6">
Arturo Jasso Origel committed
944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968
                        <div class="row">
                            <div class="col-6">
                                <strong>Motivo de cancelación:</strong>
                            </div>
                            <div class="col-6">
                                <span t-field="ti.cancel_reason" />
                            </div>
                        </div>
                    </div>
                </div>
                <t t-if="ti.comment">
                    <div class="row">
                        <div class="mb-3 col-12">
                            <strong>Comentario de cierre:</strong>
                        </div>
                    </div>
                    <div class="row">
                        <div class="mb-3 col-12">
                            <span t-field="ti.comment" />
                        </div>
                    </div>
                </t>
                <t t-if="ti.description">
                    <div class="row">
                        <div class="mb-3 col-12">
969
                            <strong>Descripción del problema:</strong>
Arturo Jasso Origel committed
970 971 972 973 974 975 976 977
                        </div>
                    </div>
                    <div class="row">
                        <div class="mb-3 col-12">
                            <span t-field="ti.description" />
                        </div>
                    </div>
                </t>
978 979 980 981 982 983 984 985 986 987 988 989
                <t t-if="ti.descripcion_solution">
                    <div class="row">
                        <div class="mb-3 col-12">
                            <strong>Descripción de la solución:</strong>
                        </div>
                    </div>
                    <div class="row">
                        <div class="mb-3 col-12">
                            <span t-field="ti.descripcion_solution" />
                        </div>
                    </div>
                </t>
Arturo Jasso Origel committed
990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024
                <t t-if="ti.priority_new and ti.customer_comment">
                    <div class="row">
                        <div class="mb-3 col-6">
                            <div class="row">
                                <div class="col-6">
                                    <strong>Calificación:</strong>
                                </div>
                                <div class="col-6">
                                    <span class="float-right" title="Rating" role="img" t-attf-aria-label="Rating: #{ti.priority_new} on 3">
                                        <t t-foreach="range(2, 7)" t-as="i">
                                            <span t-attf-class="fa fa-lg fa-star#{'' if i &lt;= int(ti.priority_new) else '-o'}" />
                                        </t>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="mb-3 col-6">
                            <div class="row">
                                <div class="col-6">
                                    <strong>Comentario:</strong>
                                </div>
                                <div class="col-6">
                                    <span t-field="ti.customer_comment" />
                                </div>
                            </div>
                        </div>
                    </div>
                </t>
            </div>
        </div>
    </template>



</odoo>