Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2861 Prikazi

I want to retrieve the current user in a form:


var session = require('web.session');
user = session.uid


I get require is not defined.


Thank you

Avatar
Opusti
Avtor

Thank you

Best Answer

Hi!,

Try this code:

context = self._context
user = context.get('uid')


Hope it work for you!

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jul. 25
2493
2
jul. 25
7936
2
jul. 25
4369
2
jul. 25
4084
2
jun. 25
2682