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)
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
Registrieren| Verknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
|---|---|---|---|---|
|
0
Apr. 26
|
20 | |||
|
1
Dez. 24
|
6083 | |||
|
1
Feb. 16
|
5632 | |||
|
1
März 15
|
7314 | |||
|
0
März 15
|
4855 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.