Search Here

Inherit Login and Logout Web Controller in Odoo14

 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.

Inherit Login and Logout Web Controller in Odoo14,Users last login time,presence activity,Get user id after logout,set assign security groups,web_login,logout,super

Purpose of Inheritance for Login and Logout Web Controller in Odoo14

  1. Add users presence activity (set logged-in time) in the database, when user login
  2. Assign security groups to the logged-in user, when login
  3. Add, delete or update record in the database on login and logout event
  4. Redirect to some custom template before or after login
  5. 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']

Post a Comment

2 Comments

  1. 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...

    ReplyDelete
    Replies
    1. try this
      from odoo import http
      from odoo.http import request

      Delete