Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5093 มุมมอง

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


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ย. 22
2099
0
ม.ค. 22
465
3
พ.ย. 21
3692
Odoo Installation Script แก้ไขแล้ว
4
ธ.ค. 24
17946
Upgrade from V14 to V15 แก้ไขแล้ว
1
ต.ค. 21
9376