How we can override the login method of odoo
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
1
Reply
3591
Views
Hi,
See this:
from odoo.addons.web.controllers import main
class Home(main.Home):
@http.route('/web/login', type='http', auth="public")
def web_login(self, redirect=None, **kw):
main.ensure_db()
request.params['login_success'] = False
if request.httprequest.method == 'GET' and redirect and request.session.uid:
return http.redirect_with_hash(redirect)
You can find the code in this module: https://apps.odoo.com/apps/modules/13.0/access_restriction_by_ip/
Thanks
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up