Browse Source

fix linting issue on the module

pull/931/head
Damien Crier 6 years ago
parent
commit
df8a0375aa
  1. 13
      users_ldap_populate/README.rst
  2. 14
      users_ldap_populate/__openerp__.py
  3. 4
      users_ldap_populate/tests/test_users_ldap_populate.py

13
users_ldap_populate/README.rst

@ -0,0 +1,13 @@
This module allows to prepopulate the user database with all entries in the
LDAP database.
In order to schedule the population of the user database on a regular basis,
create a new scheduled action with the following properties:
- Object: res.company.ldap
- Function: action_populate
- Arguments: [res.company.ldap.id]
Substitute res.company.ldap.id with the actual id of the res.company.ldap
object you want to query.

14
users_ldap_populate/__openerp__.py

@ -24,20 +24,6 @@
"author": "Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": 'Tools',
"description": """
This module allows to prepopulate the user database with all entries in the
LDAP database.
In order to schedule the population of the user database on a regular basis,
create a new scheduled action with the following properties:
- Object: res.company.ldap
- Function: action_populate
- Arguments: [res.company.ldap.id]
Substitute res.company.ldap.id with the actual id of the res.company.ldap
object you want to query.
""",
"depends": [
'auth_ldap',
],

4
users_ldap_populate/tests/test_users_ldap_populate.py

@ -5,7 +5,7 @@ from openerp.tests.common import TransactionCase
from contextlib import contextmanager
class patch_ldap_connection(object):
class PatchLdapConnection(object):
def __init__(self, results):
self.results = results
@ -30,7 +30,7 @@ def patch_ldap(self, results):
original_initialize = ldap.initialize
def initialize(uri):
return patch_ldap_connection(results)
return PatchLdapConnection(results)
ldap.initialize = initialize
yield
ldap.initialize = original_initialize

Loading…
Cancel
Save