Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
4920 Weergaven

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"


Avatar
Annuleer
Beste antwoord

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

Avatar
Annuleer
Beste antwoord

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


Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
sep. 22
1944
0
jan. 22
465
3
nov. 21
3532
4
dec. 24
17692
1
okt. 21
9227