ir_http.py 373 B

1234567891011121314
  1. # -*- coding: utf-8 -*-
  2. from odoo import models
  3. from odoo.http import request
  4. class IrHttp(models.AbstractModel):
  5. _inherit = 'ir.http'
  6. def session_info(self):
  7. info = super().session_info()
  8. # because frontend session_info uses this key and is embedded in
  9. # the view source
  10. info["user_id"] = request.session.uid,
  11. return info