Odoo Help

1

How Get A Current Login User Name ?

By
sunil
on 8/22/13, 10:01 AM 4,331 views

How Get A Current Login User Name in Textbox when Any Form Load time?

3

Prakash

--Prakash--
3218
| 5 4 7
Bikaner, India
--Prakash--

OpenERP Devloper at SunARC Technology

Prakash
On 8/22/13, 10:08 AM

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.

Yenthe
on 1/19/15, 6:04 AM
2

Odoo

--Odoo --
1348
| 5 2 5
kerala, India
--Odoo --

Working as a Odoo Functional and Technical Expert

Odoo
On 2/23/16, 11:07 PM
define user_id as many2one (res.users)


_defaults = { 'user_id': lambda obj, cr, uid, ctx=None: uid,}

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 8/22/13, 10:01 AM
Seen: 4331 times
Last updated: 2/23/16, 11:07 PM