Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
5053 Переглядів

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
2074
0
січ. 22
465
3
лист. 21
3656
4
груд. 24
17888
Upgrade from V14 to V15 Вирішено
1
жовт. 21
9363