Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
5076 Tampilan

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"


Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Jawaban Terbai

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


Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
2
Sep 22
2084
0
Jan 22
465
3
Nov 21
3660
4
Des 24
17901
1
Okt 21
9369