Skip to Content
Menu
This question has been flagged
1 Reply
2436 Views

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
Discard
Author

Thank you

Best Answer

Hi!,

Try this code:

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


Hope it work for you!

Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
1482
1
Nov 24
1187
2
Sep 24
1046
1
Aug 24
2450
3
Aug 24
2683