Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5073 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore

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


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
set 22
2082
0
gen 22
465
3
nov 21
3660
4
dic 24
17899
1
ott 21
9368