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:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
3
回复
15001
查看
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,}
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
2
4月 23
|
23222 | ||
|
1
3月 15
|
6948 | ||
|
3
3月 15
|
7023 | ||
|
0
3月 15
|
5756 | ||
|
2
9月 15
|
10664 |