Skip to content

Commit

Permalink
[10.0][FIX] users_ldap_mail: Provide defaults to attributes properly
Browse files Browse the repository at this point in the history
Forward-port OCA/server-tools#1405.
  • Loading branch information
Artem Kostyuk authored and joao-p-marques committed Feb 8, 2021
1 parent cebd3b3 commit 4254367
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 35 deletions.
11 changes: 7 additions & 4 deletions users_ldap_mail/i18n/de.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * users_ldap_mail
#
#
# Translators:
# Rudolf Schnapka <rs@techno-flex.de>, 2016
msgid ""
Expand All @@ -11,19 +11,22 @@ msgstr ""
"POT-Creation-Date: 2016-04-17 12:15+0000\n"
"PO-Revision-Date: 2016-04-21 09:16+0000\n"
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>\n"
"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-9-0/language/de/)\n"
"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-9-0/"
"language/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: users_ldap_mail
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
msgid ""
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
"instead."
msgstr "'cn' wird per Vorgabe benutzt. Bei ActiveDirectory können Sie stattdessen 'displayName' verwenden."
msgstr ""
"'cn' wird per Vorgabe benutzt. Bei ActiveDirectory können Sie stattdessen "
"'displayName' verwenden."

#. module: users_ldap_mail
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute
Expand Down
11 changes: 7 additions & 4 deletions users_ldap_mail/i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * users_ldap_mail
#
#
# Translators:
# Antonio Trueba, 2016
# Antonio Trueba, 2016
Expand All @@ -12,19 +12,22 @@ msgstr ""
"POT-Creation-Date: 2016-01-19 14:46+0000\n"
"PO-Revision-Date: 2016-02-16 12:32+0000\n"
"Last-Translator: Antonio Trueba\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-9-0/language/es/)\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-9-0/"
"language/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: users_ldap_mail
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
msgid ""
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
"instead."
msgstr "Por defecto se usa «cn». En Directorio Activo se podría usar «displayName» en su lugar."
msgstr ""
"Por defecto se usa «cn». En Directorio Activo se podría usar «displayName» "
"en su lugar."

#. module: users_ldap_mail
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute
Expand Down
7 changes: 4 additions & 3 deletions users_ldap_mail/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * users_ldap_mail
#
#
# Translators:
msgid ""
msgstr ""
Expand All @@ -10,11 +10,12 @@ msgstr ""
"POT-Creation-Date: 2016-01-19 14:46+0000\n"
"PO-Revision-Date: 2015-12-13 15:21+0000\n"
"Last-Translator: <>\n"
"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-9-0/language/fr/)\n"
"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-9-0/"
"language/fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: users_ldap_mail
Expand Down
7 changes: 4 additions & 3 deletions users_ldap_mail/i18n/hr.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * users_ldap_mail
#
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Bole <bole@dajmi5.com>, 2017
Expand All @@ -13,11 +13,12 @@ msgstr ""
"PO-Revision-Date: 2017-05-10 00:47+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2017\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hr\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"

#. module: users_ldap_mail
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
Expand Down
13 changes: 8 additions & 5 deletions users_ldap_mail/i18n/hr_HR.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * users_ldap_mail
#
#
# Translators:
# Bole <bole@dajmi5.com>, 2016
msgid ""
Expand All @@ -11,19 +11,22 @@ msgstr ""
"POT-Creation-Date: 2016-06-09 12:31+0000\n"
"PO-Revision-Date: 2016-05-31 20:13+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>\n"
"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-server-tools-9-0/language/hr_HR/)\n"
"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-server-"
"tools-9-0/language/hr_HR/)\n"
"Language: hr_HR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: hr_HR\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"

#. module: users_ldap_mail
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
msgid ""
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
"instead."
msgstr "Zadano koristi 'cn'. Za ActiveDirectory možete koristiti i 'displayName'."
msgstr ""
"Zadano koristi 'cn'. Za ActiveDirectory možete koristiti i 'displayName'."

#. module: users_ldap_mail
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute
Expand Down
10 changes: 6 additions & 4 deletions users_ldap_mail/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * users_ldap_mail
#
#
# Translators:
# Armando Vulcano Junior <vulcano@uol.com.br>, 2015
msgid ""
Expand All @@ -11,19 +11,21 @@ msgstr ""
"POT-Creation-Date: 2015-12-15 01:55+0000\n"
"PO-Revision-Date: 2015-12-13 15:21+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-tools-9-0/language/pt_BR/)\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-"
"tools-9-0/language/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: users_ldap_mail
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
msgid ""
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
"instead."
msgstr "Por padrão 'cn' é usado. Para ActiveDirectory você pode usar 'displayName'"
msgstr ""
"Por padrão 'cn' é usado. Para ActiveDirectory você pode usar 'displayName'"

#. module: users_ldap_mail
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute
Expand Down
14 changes: 9 additions & 5 deletions users_ldap_mail/i18n/sl.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * users_ldap_mail
#
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
msgid ""
Expand All @@ -11,19 +11,23 @@ msgstr ""
"POT-Creation-Date: 2015-12-15 01:55+0000\n"
"PO-Revision-Date: 2015-12-14 06:46+0000\n"
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-9-0/language/sl/)\n"
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-9-0/"
"language/sl/)\n"
"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: sl\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
"%100==4 ? 2 : 3);\n"

#. module: users_ldap_mail
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
msgid ""
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
"instead."
msgstr "Privzeto se uporablja 'cn'. Za aktivni imenik bi lahko namesto tega uporabili 'displayName'."
msgstr ""
"Privzeto se uporablja 'cn'. Za aktivni imenik bi lahko namesto tega "
"uporabili 'displayName'."

#. module: users_ldap_mail
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute
Expand Down
40 changes: 40 additions & 0 deletions users_ldap_mail/i18n/users_ldap_mail.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * users_ldap_mail
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: users_ldap_mail
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
msgid "By default 'cn' is used. For ActiveDirectory you might use 'displayName' instead."
msgstr ""

#. module: users_ldap_mail
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute
msgid "E-mail attribute"
msgstr ""

#. module: users_ldap_mail
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_mail_attribute
msgid "LDAP attribute to use to retrieve em-mail address."
msgstr ""

#. module: users_ldap_mail
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_name_attribute
msgid "Name Attribute"
msgstr ""

#. module: users_ldap_mail
#: model:ir.model,name:users_ldap_mail.model_res_company_ldap
msgid "res.company.ldap"
msgstr ""

7 changes: 4 additions & 3 deletions users_ldap_mail/i18n/zh_CN.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * users_ldap_mail
#
#
# Translators:
# Jeffery Chenn <jeffery9@gmail.com>, 2016
msgid ""
Expand All @@ -11,11 +11,12 @@ msgstr ""
"POT-Creation-Date: 2016-08-31 11:58+0000\n"
"PO-Revision-Date: 2016-09-04 06:11+0000\n"
"Last-Translator: Jeffery Chenn <jeffery9@gmail.com>\n"
"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-server-tools-9-0/language/zh_CN/)\n"
"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-server-"
"tools-9-0/language/zh_CN/)\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. module: users_ldap_mail
Expand Down
12 changes: 8 additions & 4 deletions users_ldap_mail/models/users_ldap_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,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):
"""
Expand Down

0 comments on commit 4254367

Please sign in to comment.