~camptocamp/partner-contact-management/7.0-add_birthdate_nbi

« back to all changes in this revision

Viewing changes to partner_address_ldap/company.py

  • Committer: Joël Grand-Guillaume
  • Date: 2011-08-12 12:33:12 UTC
  • Revision ID: joel.grandguillaume@camptocamp.com-20110812123312-b4tbq3s80ztvn5d4
[ADD] First commit of the first generic modules to move in our new public branch
(lp:c2c-addons/6.1  rev 1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
##############################################################################
 
3
#
 
4
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) 
 
5
# All Right Reserved
 
6
#
 
7
# Author : Nicolas Bessi (Camptocamp), Thanks to Laurent Lauden for his code adaptation
 
8
# Active directory Donor: M. Benadiba (Informatique Assistances.fr)
 
9
# Contribution : Joel Grand-Guillaume
 
10
#
 
11
# WARNING: This program as such is intended to be used by professional
 
12
# programmers who take the whole responsability of assessing all potential
 
13
# consequences resulting from its eventual inadequacies and bugs
 
14
# End users who are looking for a ready-to-use solution with commercial
 
15
# garantees and support are strongly adviced to contract a Free Software
 
16
# Service Company
 
17
#
 
18
# This program is Free Software; you can redistribute it and/or
 
19
# modify it under the terms of the GNU General Public License
 
20
# as published by the Free Software Foundation; either version 2
 
21
# of the License, or (at your option) any later version.
 
22
#
 
23
# This program is distributed in the hope that it will be useful,
 
24
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
26
# GNU General Public License for more details.
 
27
#
 
28
# You should have received a copy of the GNU General Public License
 
29
# along with this program; if not, write to the Free Software
 
30
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
31
#
 
32
##############################################################################
 
33
 
 
34
from osv import osv, fields
 
35
 
 
36
class Res_company(osv.osv):
 
37
    """Defin ldap connexion parameters"""
 
38
 
 
39
    _inherit = 'res.company'
 
40
    _columns = {
 
41
        'base_dn': fields.char(
 
42
            'User dn',
 
43
            size=128,
 
44
            help="Exemple: cn=contacts_admin,dc=ldap,dc=dcc2c"
 
45
        ),
 
46
        'contact_dn': fields.char(
 
47
            'Bind dn',
 
48
            size=128,
 
49
            help="Exemple: dc=ldap,dc=dcc2c -- watchout" +\
 
50
                 " the OU will be automatically included inside"
 
51
        ),
 
52
        'ounit': fields.char(
 
53
            'Contact Organizational unit of the contacts',
 
54
            size=128,
 
55
            help="Exemple: Contacts"
 
56
        ),
 
57
        'ldap_server': fields.char(
 
58
            'Server address',
 
59
            size=128,
 
60
            help="Exemple: ldap.camptocamp.com"
 
61
        ),
 
62
        'passwd': fields.char('ldap password', size=128, help="Exemple: Mypassword1234"),
 
63
        'ldap_active': fields.boolean(
 
64
            'Activate ldap link for this company',
 
65
            help='If not check nothing will be reported into the ldap'
 
66
        ),
 
67
        'is_activedir': fields.boolean(
 
68
            'Active Directory ?',
 
69
            help='The ldap is part of an Active Directory'
 
70
        ),
 
71
        'ldap_port': fields.integer('LDAP Port',
 
72
                                     help="If not specified, the default port" 
 
73
                                     "(389), will be used")
 
74
    }
 
75
 
 
76
Res_company()