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

I have seen in presentations and posts that by changing the "odoo" part of the url to "json" I can then get a json response:

Example:

/odoo/project/5/tasks

/json/project/5/tasks

This works on Runbot and on demo.odoo.com but not my production instance.

I would like to activate the /json/ view on URL change on my database.

What do I have to do to enable it?


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You need to create a System Parameter and be a member of the Access to export feature group:

1) In Developer Mode, visit the System Parameters Menu.

2) Create a new record with Key as web.json.enabled - the Value is not important, as long as the key exists the feature will work


3) Ensure you and any User wanting to access this feature are a member of the group:



อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hey Ray,

Thanks for the answer but I have recreated the same but same error is appearing. Both the new record with the key  web.json.enabled and value as True (though you mentioned it doesnt matter). Still getting the error.

Forbidden

Missing "Authorization" or Sec-headers for interactive usage

อวตาร
ละทิ้ง

If you remove debug=1 from the URL, you should see the JSON.

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ธ.ค. 21
2954
0
พ.ย. 24
645
0
มี.ค. 24
804
Data for relations table แก้ไขแล้ว
1
เม.ย. 24
1492
1
ธ.ค. 23
6463