Skip to Content
मेन्यू
This question has been flagged
1 Reply
9613 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
4221
1
फ़र॰ 16
3807
1
मार्च 15
5263
0
मार्च 15
3162
1
मार्च 15
5726