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)
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
0
kwi 26
|
20 | |||
|
1
gru 24
|
5964 | |||
|
1
lut 16
|
5457 | |||
|
1
mar 15
|
7102 | |||
|
0
mar 15
|
4706 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.