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)
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ść | |
---|---|---|---|---|
|
1
gru 24
|
4085 | ||
|
1
lut 16
|
3684 | ||
|
1
mar 15
|
5129 | ||
|
0
mar 15
|
3056 | ||
|
1
mar 15
|
5618 |