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)
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
0
apr. 26
|
20 | |||
|
1
dec. 24
|
6086 | |||
|
1
feb. 16
|
5642 | |||
|
1
mar. 15
|
7321 | |||
|
0
mar. 15
|
4860 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.