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!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Nov 24
|
1482 | ||
|
1
Nov 24
|
1187 | ||
|
2
Sep 24
|
1046 | ||
Update stock quantity
Solved
|
|
1
Aug 24
|
2450 | |
|
3
Aug 24
|
2683 |
Thank you