Odoo Help

Welcome!

This community 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.

1

More details to be imported from ldap?

By
Ian Beardslee
on 4/11/13, 1:33 AM 1,712 views

We are wanting to get more details imported into OpenERP from LDAP. I have a test environment that now adds the photo, email address and phones numbers from LDAP on the first LDAP login.

Changes to addons/auth_ldap/users_ldap.py (def map_ldap_attributes ~line 163).

    values = { 'name': ldap_entry[1]['cn'][0],
               'email': ldap_entry[1]['mail'][0],
               'phone': ldap_entry[1]['telephoneNumber'][0],
               'mobile': ldap_entry[1]['mobile'][0],
               'image': ldap_entry[1]['jpegPhoto'][0].encode('base64'),
               'login': login,
               'company_id': conf['company']
               }

Before I get carried away creating a patch for this, there are a couple of other things worth exploring in more depth and I'm after people's feedback on what they'd find of value.

1/ Any other fields worth adding? Mainly asking this, because other people will have LDAP that may have more details than we do. At this point we haven't really considered adding to the fields that already exists for the current user/partner set up, but it is doable.

2/ If so, does there need to be some way of selecting/mapping those values you'd want to import? Different LDAP -> OpenERP Mappings?

3/ We want to be able to update information from LDAP (on login), eg phone number changes, or retroactively add those details to users existing before this patch. Should that be a general update all information from LDAP .. or selected fields only?

Thoughts?

Cheers, Ian

Ian Beardslee
on 4/30/13, 10:39 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 4/11/13, 1:33 AM
Seen: 1712 times
Last updated: 3/16/15, 8:10 AM