Skip to Content
Menu
This question has been flagged
2 Replies
5140 Rodiniai

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"


Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Best Answer

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


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
rugs. 22
2157
0
saus. 22
465
3
lapkr. 21
3769
4
gruod. 24
18059
1
spal. 21
9417