Hey, i have made a custom porta view for myself which displays attendance and then i had another class in controller which calls another template with a diff url and i am trying to open the detail of one attendance by clicking on it. Just as it happens in Sale order for portal. I am unable to open the page when i click the link as it gives me error as "Page 404 not found".
Here is the code for my redirection, Kindly check and tell
class NewAttendView(http.Controller):
@http.route('/attendance_line/{{order.id}}', type='http', auth='public', website=True)
def this_attend_detail(self, **kwargs):
new_attend_detail = request.env['op.attendance.sheet'].sudo().search([])
return request.render('attendance_website.attendance_lines', {'attendance_line': new_attend_detail})
@http.route('/attendance_line/{{order.id}}', type='http', auth='public', website=True)
def that_attend_rights(self, new_attend_detail=None):
new_attend_detail = request.env['op.attendance.sheet'].browse()
return request.render('attendance_website.attendance_lines', {'attendance_line': new_attend_detail})
XML line of code
<a t-attf-href="/attendance_line/{{order.id}}?{{keep_query()}}">
Controllers and Templates:
1- https://learnopenerp.blogspot.com/2018/08/odoo-web-controller.html
2- https://learnopenerp.blogspot.com/2019/01/add-attachement-file-from-odoo-website.html
3- https://learnopenerp.blogspot.com/2018/06/odoo-get-web-form-template-value-in-controller.html