Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
9529 Zobrazení


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
Zrušit
Nejlepší odpověď

Hello,

You can try this one

user_id = fields.Many2one('res.users', string='My User',default=lambda self: self.env.user) 
Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
pro 24
4153
1
úno 16
3741
1
bře 15
5195
0
bře 15
3094
1
bře 15
5650