Skip to Content
Menu
This question has been flagged
1 Atsakyti
9572 Rodiniai


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,

Portretas
Atmesti
Best Answer

Hello,

You can try this one

user_id = fields.Many2one('res.users', string='My User',default=lambda self: self.env.user) 
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
gruod. 24
4168
1
vas. 16
3764
1
kov. 15
5211
0
kov. 15
3124
1
kov. 15
5675