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,
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)
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký| Bài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
|---|---|---|---|---|
|
0
thg 4 26
|
20 | |||
|
1
thg 12 24
|
6087 | |||
|
1
thg 2 16
|
5643 | |||
|
1
thg 3 15
|
7323 | |||
|
0
thg 3 15
|
4863 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.