How Get A Current Login User Name in Textbox when Any Form Load time?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilitate
- Inventar
- PoS
- Project
- MRP
Această întrebare a fost marcată
3
Răspunsuri
15007
Vizualizări
In the default method Get User Name
def _get_user_name(self, cr, uid, *args):
user_obj = self.pool.get('res.users')
user_value = user_obj.browse(cr, uid, uid)
return user_value.login or False
_defaults = {
'user_id: _get_user_name,
}
Thanks Prakash! This has helped me a lot :) Upvoted.
define user_id as many2one (res.users)
_defaults = { 'user_id': lambda obj, cr, uid, ctx=None: uid,}
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Înscrie-teRelated Posts | Răspunsuri | Vizualizări | Activitate | |
---|---|---|---|---|
|
2
apr. 23
|
23223 | ||
|
1
mar. 15
|
6948 | ||
|
3
mar. 15
|
7028 | ||
|
0
mar. 15
|
5760 | ||
|
2
sept. 15
|
10668 |