How can I set a default user as the current user in new API,
in the V7 :
'user_id': lambda obj, cr, uid, context: uid,
How can I set a default user as the current user in new API,
in the V7 :
'user_id': lambda obj, cr, uid, context: uid,
Hello,
You can try this one
user_id = fields.Many2one('res.users', string='My User',default=lambda self: self.env.user)
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Registrarse| Publicaciones relacionadas | Respuestas | Vistas | Actividad | |
|---|---|---|---|---|
|
1
dic 24
|
5245 | |||
|
1
feb 16
|
4858 | |||
|
1
mar 15
|
6346 | |||
|
0
mar 15
|
4185 | |||
|
1
mar 15
|
6884 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.