Reputation: 816
I am trying to deactivate user once user is logout from the system.
I am facing the error
You cannot deactivate the user you're currently logged in as.
Is there any way to deactivate the user once user is logout from the system.
Upvotes: 1
Views: 686
Reputation: 3747
When your user is logged in and she logs out the function odoo.addons.web.controllers.main.session.logout
is invoked. Try overriding that function to perform your change. It should work, use sudo()
as well so that you do not get any errors.
Upvotes: 2