From 863a4cc48a3f04593cb65cb3d4e695562a767773 Mon Sep 17 00:00:00 2001 From: Artem Kostyuk Date: Thu, 25 Oct 2018 13:53:31 +0300 Subject: [PATCH] [10.0][FIX] users_ldap_mail: Provide defaults to attributes properly --- users_ldap_mail/models/users_ldap_model.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/users_ldap_mail/models/users_ldap_model.py b/users_ldap_mail/models/users_ldap_model.py index 1d625a3dc..44a9be985 100644 --- a/users_ldap_mail/models/users_ldap_model.py +++ b/users_ldap_mail/models/users_ldap_model.py @@ -12,12 +12,16 @@ class CompanyLDAP(models.Model): _inherit = 'res.company.ldap' name_attribute = fields.Char( - 'Name Attribute', _defaults='cn', + 'Name Attribute', + default='cn', help="By default 'cn' is used. " - "For ActiveDirectory you might use 'displayName' instead.") + "For ActiveDirectory you might use 'displayName' instead.", + ) mail_attribute = fields.Char( - 'E-mail attribute', _defaults='mail', - help="LDAP attribute to use to retrieve em-mail address.") + 'E-mail attribute', + default='mail', + help="LDAP attribute to use to retrieve em-mail address.", + ) def get_ldap_dicts(self): """