I want to save some infomation to session in model method,but i can not get session object,how to get it ,my odoo version is 16,thanks!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
2
Antworten
4230
Ansichten
"ir.http" is the object you need to use for session information.
session_info = self.env['ir.http'].session_info()
session_info.update(
custom_values='xyz'
)
--
Meet Dholakia
Hi,
You can get the session object by first importing the request object from odoo like
from odoo.http import request
then you can get the session from request, that can be done by
request.session
Regards
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
Registrieren
it does works well! thank you!