跳至內容
選單
此問題已被標幟
2 回覆
5065 瀏覽次數

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
2077
0
1月 22
465
3
11月 21
3659
4
12月 24
17898
1
10月 21
9367