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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
Hi!,
Try this code:
context = self._context
user = context.get('uid')
Hope it work for you!
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
0
8月 25
|
74 | ||
|
1
8月 25
|
1995 | ||
|
1
7月 25
|
2546 | ||
|
2
7月 25
|
7982 | ||
|
2
7月 25
|
4421 |
Thank you