Skip to Content
मेन्यू
This question has been flagged
1 Reply
9885 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
4476
1
फ़र॰ 16
4101
1
मार्च 15
5557
0
मार्च 15
3459
1
मार्च 15
5995