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!
Create an account today to enjoy exclusive features and engage with our awesome community!
PrijaviRelated Posts | Odgovori | Prikazi | Aktivnost | |
---|---|---|---|---|
|
1
jul. 25
|
2493 | ||
|
2
jul. 25
|
7936 | ||
|
2
jul. 25
|
4369 | ||
|
2
jul. 25
|
4084 | ||
|
2
jun. 25
|
2682 |
Thank you