Skip to Content
मेन्यू
This question has been flagged
1 Reply
9777 Views


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
Discard
Best Answer

Hello,

You can try this one

user_id = fields.Many2one('res.users', string='My User',default=lambda self: self.env.user) 
Avatar
Discard
Related Posts Replies Views Activity
1
दिस॰ 24
4406
1
फ़र॰ 16
4001
1
मार्च 15
5428
0
मार्च 15
3342
1
मार्च 15
5898