Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


How to hide record id from URL When we click on support ticket module9 (website_support_module)

on 8/3/16, 7:45 AM 113 views


this is the screen shot--------


How to change below code--------

@http.route('/support/ticket/view/<ticket>', type="http", auth="user", website=True)
def support_ticket_view(self, ticket): #only let the user this ticket is assigned to view this ticket support_ticket = http.request.env['website.support.ticket'].sudo().search([('partner_id','=',http.request.env.user.partner_id.id), ('id','=',ticket) ])[0] return http.request.render('website_support.support_ticket_view', {'support_ticket':support_ticket})

<template id="support_ticket_view_list" name="My Support Tickets" page="True">    <t t-call="website.layout">        <div class="container">            <div class="mt16 mb16">                <h1 class="text-center">My Support Tickets</h1>            </div>                    <div class="col-md-3"></div>            <div class="col-md-6">                <t t-if="ticket_count > 0">                     <table class="table table-striped table-bordered table-hover table-condensed">                        <tr><th>Subject</th><th>Category</th><th>State</th><th>Create Date</th></tr>                        <t t-foreach="support_tickets" t-as="support_ticket">                            <tr><td><a t-attf-href="/support/ticket/view/#{support_ticket.id}"><t t-esc="support_ticket.subject"/></a></td><td><t t-esc="support_ticket.category.name"/></td><td><t t-esc="support_ticket.state.name"/></td><td><t t-esc="support_ticket.create_date"/></td></tr>                        </t>                </table>                </t>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 8/3/16, 7:45 AM
Seen: 113 times
Last updated: 8/3/16, 7:48 AM