Partner synchronization from OpenERP to ldap
partner_address_ldap · OCA/partner-contact
-
Security25/25No findings
-
Activity0/25Last human commit 141 months ago
-
Required by5/250 modules depend on it
-
Maturity5/25In 1 Odoo series since 6.1
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Migrating to 19.0: only `__manifest__.py` is recognized: a module with `__openerp__.py` is not detected at all. migration-openerp-manifest · source
LDAPAddress— Class 'LDAPAddress' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceLDAPAddress— Class 'LDAPAddress' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceLdapPartner— Class 'LdapPartner' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceRes_company— Class 'Res_company' still inherits from the old-style `osv.osv` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceRes_company— Class 'Res_company' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourcebase.view_partner_address_tree— Migrating to 18.0: the `tree` view type was renamed to `list` (`<list>` roots, `view_mode`). migration-view-tree-tag · sourceview_company_for_ldap— Migrating to 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) migration-openerp-import · source
- Migrating to 10.0: the `openerp` namespace was renamed to `odoo`; only a deprecated `openerp.addons` alias remained. (`openerp.osv`) migration-openerp-import · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
Description
Live partner address synchronization through a LDAP module (inetOrgPerson). OpenERP becomes the master of the LDAP. Each time an address is deleted, created or updated the same is done in the ldap (a new record is pushed). The LDAP configuration is done in the company view. There can be one different LDAP per company. Do not forget to activate the LDAP link in the configuration. The used LDAP depends on the current user company.
This module does not allows bulk batching synchronisation into the LDAP and is thus not suitable for an instant use with an existing LDAP. In order to use it with an existing LDAP you have to alter the uid of contact in your LDAP. The uid should be terp_ plus the OpenERP contact id (for example terp_10).
N.B: The module requires the python-ldap library Unicode support --> As python ldap does not support unicode we try to decode string if it fails we transliterate values. Active Directory Support for Windows server 2003, try 2008 at your own risk (AD support not tested for Version 6 of OpenERP looking for active dir test infra)
Dependencies
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 7
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
base.view_partner_address_tree |
res.partner.address.tree | res.partner.address | tree | New |
view_company_for_ldap |
res.company.form | res.company | form | Inherits base.view_company_form |
view_partner_address_form1_inherit_ldap |
res.partner.address.form1.c2c_partner_adress | res.partner.address | form | Inherits base.view_partner_address_form1 |
view_partner_address_form1_inherit_ldap2 |
res.partner.address.form1.c2c_partner_adress | res.partner.address | form | Inherits base.view_partner_address_form1 |
view_partner_address_form2_inerit_ldap |
res.partner.address.form2_c2c_partner_address | res.partner.address | form | Inherits base.view_partner_address_form2 |
view_partner_address_form_inerit_ldap |
res.partner.address.form2_c2c_partner_address | res.partner.address | form | Inherits base.view_partner_address_form2 |
view_partner_form_inherite_contact_ldap |
res.partner.form2_partner_address | res.partner | form | Inherits base.view_partner_form |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 2
No new fields.
Public methods (1)-
unlink(self, cursor, uid, ids, context=None)
No new fields.
Public methods (16)-
addNeededFields(self, id, vals, cursor, uid) -
connectToLdap(self, cursor, uid, context=None)Reinitialize ldap connection -
create(self, cursor, uid, vals, context=None) -
getLdapContact(self, conn, id) -
getVals(self, att_name, key, vals, dico, uid, ids, cursor, context=None)map to values to dict -
getconn(self, cursor, uid, context=None)LdapConnMApper -
init(self, cr) -
ldaplinkactive(self, cursor, uid, context=None)Check if ldap is activated for this company -
mappLdapObject(self, id, vals, cursor, uid, context)Mapp ResPArtner adress to moddlist -
removeLdapContact(self, id, cursor, uid)Remove a contact from ldap -
saveLdapContact(self, id, vals, cursor, uid, context=None)save openerp adress to ldap -
unUnicodize(self, indict)remove unicode data of modlist as unicode is not supported by python-ldap librairy till version 2.7 -
unlink(self, cursor, uid, ids, context=None) -
updateLdapContact(self, id, vals, cursor, uid, context)update an existing contact with the data of OpenERP -
validate_entries(self, vals, cursor, uid, ids)Validate data of an address based on the inetOrgPerson schema -
write(self, cursor, uid, ids, vals, context=None)