Odoo Help

1

More details to be imported from ldap?

By
Ian Beardslee
on 4/11/13, 1:33 AM 1,868 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

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

0 follower(s)

Stats

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