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,
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
dic 24
|
4062 | ||
|
1
feb 16
|
3667 | ||
|
1
mar 15
|
5111 | ||
|
0
mar 15
|
3036 | ||
|
1
mar 15
|
5603 |