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

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
2491
2
7月 25
7934
2
7月 25
4368
2
7月 25
4083
2
6月 25
2681