auth_signup/models/ir_http.py

20 lines
565 B
Python
Raw Permalink Normal View History

2024-05-03 12:44:03 +03:00
# -*- coding: utf-8 -*-
2024-05-21 15:09:15 +03:00
# Part of Talisman . See LICENSE file for full copyright and licensing details.
2024-05-03 12:44:03 +03:00
from odoo import models
from odoo.http import request
class Http(models.AbstractModel):
_inherit = 'ir.http'
@classmethod
def _pre_dispatch(cls, rule, args):
super()._pre_dispatch(rule, args)
# add signup token or login to the session if given
for key in ('auth_signup_token', 'auth_login'):
val = request.httprequest.args.get(key)
if val is not None:
request.session[key] = val