This forum is now just an archive. Use the new Q&A website
It is currently Fri Apr 25, 2014 1:52 am

All times are UTC + 2 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 
Author Message
 Post subject: How to install python-ldap for OpenERP in Windows?
PostPosted: Mon Jun 21, 2010 8:31 am 
Offline

Joined: Thu Jun 17, 2010 7:43 am
Posts: 9
Hello,

I have installed OpenErp All in One 5.0.11 on Windows Server 2003 sp2.

After done installation and some configuration I managed to run OpenErp from client software and web interface.

Now, I need to integrate it with user_ldap module so it can interact with Active directory on another server.

So I have been searching and reading some threads in this forum and the closest one I can get is from http://www.openobject.com/forum/topic15165.html.

So here is what I have done,

1. I downloaded python-ldap-2.3.11.win32-py2.6.msi file from http://pypi.python.org/pypi/python-ldap/
2. Installed onto c:\
3. Copied all contents (ldap folder and some py files) from C:\Lib\Site-packages\ into a big zip file C:\Program Files\OpenERP AllInOne\Server\library.zip
4. Open OpenERP client and login as admin.
5. Installed Open_Ldap module.
6. Then Open Companies profile and entered these details in Ldap parameters:

LDAP Server address: ADServer.organisation.org
LDAP Server port: 389
Sequence: 10 (not sure what is this for)
Ldap Password: *******
LDAP Binddn: administrator@organisation.org
LDAP base: dc=organisation, dc=org
LDAP filter: cn=%s
Create user: ticked
Model user: Demo User

7. Then save this and closed OpenErp Client.
8. Restarted OpenErp Server services.
9. Tried to login with Active Directory login - it says bad username/password.
10. Checked OpenErp-Server.log and found few Warning:

WARNING:init:could not import ldap library !!
WARNING:init:module users_ldap: no quality certificate
WARNING:init:object res.company.ldap (res.company.ldap) has no access rules!

I have a feeling that my python-ldap is not detected/installed properly.

Can someone help me out to understand why my ldap is not working?
Or if someone managed to integrate AD and OpenErp can post step by step guide/instruction what to do? as I could not find a proper instruction.

Thank you.

Cheers,


Danny


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 21, 2010 8:41 am 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3114
Location: Lotharingie
first, allinone is build with python 2.5 , you installed a 2.6 library ...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2010 12:59 am 
Offline

Joined: Thu Jun 17, 2010 7:43 am
Posts: 9
Hi GEM,

Thank you for your reply.

I have downloaded python-ldap-2.3.11.win32-py2.5.exe and I have installed python 2.5 in order to extract python-ldap files.

Then I copied all contents from site-packages to Server Library.zip file.

Then restarted my machine and tested it again.

I still get the same error message in the log...

Any other ideas? :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 22, 2010 8:49 am 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3114
Location: Lotharingie
have you install in library.zip python-ldap too?
http://pypi.python.org/pypi/python-ldap/


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 23, 2010 1:28 am 
Offline

Joined: Thu Jun 17, 2010 7:43 am
Posts: 9
Hi GEM,

Thank you again for your reply

When you say install in library.zip, is it the same as copy and paste some files into library.zip?

As I did downloaded python-ldap-2.3.11.win32-py2.5.exe from pypi.python.org/pypi/python-ldap/

Then I run it and it extracted into C:\Python25\Lib\site-packages\
So I copied all the contents inside site-packages folder to Library.zip.

If this is not right, could you let me know what steps do I need to take?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 23, 2010 9:03 am 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3114
Location: Lotharingie
in users_ldap you have "import ldap line 29", in fact it is python_ldap lib.
you installed it, you should have installed :
folder ldap
files dsml.py, ldapurl.py, ldif.py
copy folder and files in server/library.zip
restart server


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 23, 2010 9:15 am 
Offline

Joined: Thu Jun 17, 2010 7:43 am
Posts: 9
Hi..

I have checked and ldap folder and all py files are in library.zip.

I did try to restart the server and run again - same error log I got.

I am not sure why it still won't load the ldap library.

I am thinking, if I can download a working library.zip from someone, I might be able to test ldap again :)

I did make sure that it was python-ldap 2.5 that I use.

Thank you again ! :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 20, 2010 12:01 pm 
Offline

Joined: Fri Mar 12, 2010 5:19 pm
Posts: 74
Location: France
Hi OneWay,

have you solved your prb ? I've the same with a Windows server 2003.
No way to do the ldap works !

I've installed the python-ldap library under an XP and then copied files specified by GEM and the folder ldap into the library.zip .

Had a result ? thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 20, 2010 12:02 pm 
Offline

Joined: Fri Mar 12, 2010 5:19 pm
Posts: 74
Location: France
Hi OneWay,

have you solved your prb ? I've the same with a Windows server 2003.
No way to do the ldap works !

I've installed the python-ldap library under an XP and then copied files specified by GEM and the folder ldap into the library.zip .

Had a result ? thanks


Top
 Profile  
 
 Post subject: Re: How to install python-ldap for OpenERP in Windows?
PostPosted: Thu Nov 18, 2010 3:56 pm 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3114
Location: Lotharingie
Hi,
for windows, you have just to put all files in python-ldap (exept .egg-info and .pyc) in server\library.zip, but also add in server\ all dll of openldap you can find after a little time of search here (restart openerp-server):
http://svn.kmrc.de/download/distributio ... -Win32.zip

or, because sometimes I'm kind, you can download a functionnal server 5.0.15 with all include (users_ldap + all required libraries) :
http://dl.free.fr/gpZBr4LeV/openerp-ser ... 5.0.15.zip

if you want to build yourself, install python-ldap (with easy_install extract all files in .egg in site-packages), and copy all dll of openldap-2.4.8... in c:\python25\dlls
add "ldap" in the list of required libraries in server\setup.py line 165 after
"imaplib", "smtplib", "email",
and build
how to build installer for windows :
topic12184.html

bye


Top
 Profile  
 
 Post subject: Re: How to install python-ldap for OpenERP in Windows?
PostPosted: Thu Nov 25, 2010 10:44 am 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3114
Location: Lotharingie
I update the link to download the server (I post this of openldap to download the server).


Top
 Profile  
 
 Post subject: Re: How to install python-ldap for OpenERP in Windows?
PostPosted: Sun May 22, 2011 8:04 am 
Offline

Joined: Fri Mar 19, 2010 1:14 pm
Posts: 221
Location: Annecy
I had a similar problem for a customer who use c2c_contact_to_ldap in v5.
the solution we choose was to use openerp from the sources and with pithon 2.7 including the required library (openldap and python-ldap).
Special thanks to GEM for his help.

_________________
Frédéric Blanc - http://www.dclic-erp.fr


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP