Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
4927 Представления

Hello guys;

I am trying to build rest api from controllers I started to test in post man but it gives me 404 error ,but it works in browers here is my sample code:


from odoo import http

class frfr(http.Controller):
@http.route('/hello/',auth='public',type='json',csrf=False,method=['GET'])
def hello(self, **kwargs):
return "hello world"


Аватар
Отменить
Лучший ответ

Hi,

Do you have multiple database's in the odoo instance ? If yes, try by keeping single db and see if it works.

Either you can set db filter or db name in conf file.

Thanks

Аватар
Отменить
Лучший ответ

Hi,
setting db_name in configuration file is working. Strange but working


Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
сент. 22
1949
0
янв. 22
465
3
нояб. 21
3534
4
дек. 24
17716
1
окт. 21
9229