コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
2857 ビュー

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

アバター
破棄
著作者

Thank you

最善の回答

Hi!,

Try this code:

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


Hope it work for you!

アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 25
2473
2
7月 25
7922
2
7月 25
4346
2
7月 25
4079
2
6月 25
2671