Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
4924 Lượt xem

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"


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 9 22
1944
0
thg 1 22
465
3
thg 11 21
3533
4
thg 12 24
17702
1
thg 10 21
9228