コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
5072 ビュー

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


アバター
破棄
関連投稿 返信 ビュー 活動
2
9月 22
2082
0
1月 22
465
3
11月 21
3659
4
12月 24
17899
1
10月 21
9368