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,
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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,
Hello,
You can try this one
user_id = fields.Many2one('res.users', string='My User',default=lambda self: self.env.user)
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
1
дек. 24
|
4869 | |||
|
1
февр. 16
|
4460 | |||
|
1
мар. 15
|
5905 | |||
|
0
мар. 15
|
3831 | |||
|
1
мар. 15
|
6371 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.