Getting 404 Error for web controller
in Postman http://localhost:8017/school/schoolrecords
File name: controller/controllers.py
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from odoo import http
from odoo.http import request
_logger = logging.getLogger(__name__)
class StudentController(http.Controller):
@http.route('/school/schoolrecords', type='http', auth='public', methods=['GET'])
def getSchoolRecords(self):
school_rec = request.env['school.student'].sudo().search([])
school=[]
for rec in school_rec:
vals={
'id':rec.classid
}
school.append(vals)
return {'student':school}
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilitat
- Inventari
- PoS
- Project
- MRP
This question has been flagged
1792
Vistes
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-seRelated Posts | Respostes | Vistes | Activitat | |
---|---|---|---|---|
|
3
de juny 24
|
3021 | ||
|
1
de març 23
|
3425 | ||
|
0
d’abr. 17
|
2722 | ||
|
0
de març 15
|
3773 | ||
add fields to signup page
Solved
|
|
2
d’abr. 25
|
2988 |