I want to create an odoo controller and be able to use it without the need of authentication. Can anyone help ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi Redi,
In route give auth='public' ,
Public authentication. Anyone can access.
Refer,
https://www.odoo.com/forum/help-1/what-is-the-use-of-auth-public-parameter-in-http-route-84696
Hello , but still need to know after i've done this and then i return a result , how can i call and use this result on other model without using parameters of 1 specifc database
by using auth=public.
class MyController(odoo.http.Controller): @route('/some_url', auth='public') def handler(self): return stuff()
Please find more details on odoo website document with below link.
https://www.odoo.com/documentation/14.0/developer/reference/addons/http.html
When i used authentication i took the returned data from the controller like this:
session = requests.Session()
r = session.post(url=url_connect, data=json.dumps(data_connect), headers=headers)
if r.ok:
session_id = r.headers['Set-Cookie'].split(';')[0].replace('session_id=', '')
if session_id:
session.cookies['session_id'] = session_id
r = session.get(url=url, data=json.dumps(data), headers=headers)
result = r.json()['result']
,including the database params and the urls.
How can i take the returned data from controller in my case now ?
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Dec 23
|
1002 | ||
|
2
Aug 23
|
934 | ||
|
1
Dec 23
|
2077 | ||
|
1
Jul 23
|
1522 | ||
|
0
May 23
|
1286 |