Odoo Help


How to get current language in model?

on 5/20/13, 8:39 AM 4,062 views

Hi! I'm inheriting class and I want to get there language of current logged in user

class hr_employee(osv.osv):

    _name = "hr.employee"
    _inherit = "hr.employee"

    _columns = {
        'code': fields.char('Code', size=11, select=True)

How can I do so?

hi look in file i18n you can create your translation otherwise : you Have Translation in your Form mode developer

on 5/20/13, 8:47 AM

I think about it, but I dont know all cases of this field.

on 5/20/13, 8:50 AM

Log in Developer Mode. a dropdown at the top left, you will add a translation

on 5/20/13, 8:56 AM

ClueLogics Technologies Pvt. Ltd.

--ClueLogics Technologies Pvt. Ltd.--
| 6 5 8
Delhi NCR, India
--ClueLogics Technologies Pvt. Ltd.--

 ClueLogics Technologies Pvt Ltd is a Software product and services provider. We are positioned to deliver robust, rapid and reliable Information Technology solutions that work. What we succeed upon is Technology and Technical Expertise. The industry review of ClueLogics has been commendable for the past years as most of its business comes from repeat orders by highly satisfied clients.

ClueLogics Technologies Pvt. Ltd.
On 5/20/13, 8:50 AM

Hi from pre-defined method create and write you can get lang of current user after override that method

for example:

 def create(cr,uid,vals,context=None):
     return (hr_employee,super).create(cr,uid,vals,context)

thanks Sandeep

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.


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

0 follower(s)


Asked: 5/20/13, 8:39 AM
Seen: 4062 times
Last updated: 3/16/15, 8:10 AM