Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2840 Zobrazení

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
Zrušit
Autor

Thank you

Nejlepší odpověď

Hi!,

Try this code:

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


Hope it work for you!

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 25
2434
2
čvc 25
7899
2
čvc 25
4305
2
čvc 25
4042
2
čvn 25
2658