I solved this by using this code:
my controller code
@http.route('/create/course-registration', type="http", auth="public", website=True)
def create_course_registration(self, **kw):
my_other_code...
my_other_ocde...
student_course = request.env['aqur.student.course'].sudo().create(
{'student_id': student_id.id, 'course_id': kw['course_id'], 'course_category_id': kw['course_category_id'],
'requisition_schedule_id': requisition_schedule_id})
return request.render('aqur_core.student_registration_thanks', {'student_course': student_course})
and here is my website template view:
(sorry if I screenshot the code above,when I paste my code in this forum it always disapear when I submit answer.But I got the other problem now, the user must do login to access the pdf,
Is there a way to access or download the pdf with public user that don't require to login?
Please, any help, source or tutorial how to do that will be very thanks,
Thanks,
Tri Nanda