Browse Source

FIX name_attribute is given an explicit default

pull/2/head
Daniel Reis 12 years ago
parent
commit
3886577031
  1. 5
      users_ldap_mail/users_ldap_model.py
  2. 2
      users_ldap_mail/users_ldap_view.xml

5
users_ldap_mail/users_ldap_model.py

@ -28,11 +28,12 @@ class CompanyLDAP(orm.Model):
_inherit = 'res.company.ldap' _inherit = 'res.company.ldap'
_columns = { _columns = {
'name_attribute': fields.char('Name Attribute', size=64, 'name_attribute': fields.char('Name Attribute', size=64,
help="Default in 'cn'. For an AD you could use 'displayName' instead."),
help="LDAP attribute for the user's name. Usually 'cn' or 'displayName'"),
'mail_attribute': fields.char('E-mail attribute', size=64, 'mail_attribute': fields.char('E-mail attribute', size=64,
help="Active Directory uses the 'mail' attribute."),
help="LDAP attribute to use for e-mail addresses."),
} }
_defaults = { _defaults = {
'name_attribute': 'cn',
'mail_attribute': 'mail', 'mail_attribute': 'mail',
} }

2
users_ldap_mail/users_ldap_view.xml

@ -8,7 +8,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="ldap_filter" position="after"> <field name="ldap_filter" position="after">
<field name="name_attribute" placeholder="e.g. displayName"/>
<field name="name_attribute"/>
<field name="mail_attribute"/> <field name="mail_attribute"/>
</field> </field>

Loading…
Cancel
Save