Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5087 Widoki

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"


Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
wrz 22
2093
0
sty 22
465
3
lis 21
3683
4
gru 24
17935
1
paź 21
9374