In this article, you will learn how to inherit the login and logout web controller in Odoo14. By inheriting controllers you can implement your custom logic on login and logout events.
Purpose of Inheritance for Login and Logout Web Controller in Odoo14
- Add users presence activity (set logged-in time) in the database, when user login
- Assign security groups to the logged-in user, when login
- Add, delete or update record in the database on login and logout event
- Redirect to some custom template before or after login
- Get user id after logout in Odoo 14 using session
Read More: Inherit Web Login Controller in Odoo8
Read More: Invoke Controller Class Function From Another Controller
Inherit Web Login Controller in Odoo14
Inherit Web Logout Controller in Odoo14
Set or assign security groups to logged in user, when login
Add users presence activity (set logged in time) in database, when user login
Add, delete or update record in database on login and logout event
Get user id after logout in Odoo 14 using session
request.session['uid']
2 Comments
Hmmm, this smells fishy. openerp.http that you're trying to import does not exist since version 10.0 so unless there's some magic going on on background this will not work...
ReplyDeletetry this
Deletefrom odoo import http
from odoo.http import request