跳至内容
菜单
此问题已终结

Why do I have to patch backend code to make specific http codes work????


I followed https://stackoverflow.com/a/67662363 and it worked, why does Odoo not support returning custom http status code in controller that has type=json??


Why is http code always hardcoded to 200? (unless we raise 3 very specific exceptions (NotFound, AuthenticationError, SessionExpiredException) you can see this here https://github.com/odoo/odoo/blob/8a8faa79929448ebd87dd58b3a7486717616334f/odoo/http.py#L654

I swear working with Odoo is so frustrating.


Is there any other way aside from monkeypatching?

形象
丢弃
相关帖文 回复 查看 活动
1
11月 23
11056
7
1月 24
48688
2
10月 20
3514
1
8月 20
16900
0
2月 21
3184