Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
9539 Prikazi


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,

Avatar
Opusti
Best Answer

Hello,

You can try this one

user_id = fields.Many2one('res.users', string='My User',default=lambda self: self.env.user) 
Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
dec. 24
4160
1
feb. 16
3751
1
mar. 15
5205
0
mar. 15
3106
1
mar. 15
5654