Skip to content

Commit 988ea01

Browse files
Artem Kostyukjoao-p-marques
authored andcommitted
[10.0][FIX] users_ldap_mail: Provide defaults to attributes properly
Forward-port OCA/server-tools#1405.
1 parent 1fc4d48 commit 988ea01

File tree

10 files changed

+97
-35
lines changed

10 files changed

+97
-35
lines changed

users_ldap_mail/i18n/de.po

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
33
# * users_ldap_mail
4-
#
4+
#
55
# Translators:
66
# Rudolf Schnapka <[email protected]>, 2016
77
msgid ""
@@ -11,19 +11,22 @@ msgstr ""
1111
"POT-Creation-Date: 2016-04-17 12:15+0000\n"
1212
"PO-Revision-Date: 2016-04-21 09:16+0000\n"
1313
"Last-Translator: Rudolf Schnapka <[email protected]>\n"
14-
"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-9-0/language/de/)\n"
14+
"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-9-0/"
15+
"language/de/)\n"
16+
"Language: de\n"
1517
"MIME-Version: 1.0\n"
1618
"Content-Type: text/plain; charset=UTF-8\n"
1719
"Content-Transfer-Encoding: \n"
18-
"Language: de\n"
1920
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2021

2122
#. module: users_ldap_mail
2223
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
2324
msgid ""
2425
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
2526
"instead."
26-
msgstr "'cn' wird per Vorgabe benutzt. Bei ActiveDirectory können Sie stattdessen 'displayName' verwenden."
27+
msgstr ""
28+
"'cn' wird per Vorgabe benutzt. Bei ActiveDirectory können Sie stattdessen "
29+
"'displayName' verwenden."
2730

2831
#. module: users_ldap_mail
2932
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute

users_ldap_mail/i18n/es.po

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
33
# * users_ldap_mail
4-
#
4+
#
55
# Translators:
66
# Antonio Trueba, 2016
77
# Antonio Trueba, 2016
@@ -12,19 +12,22 @@ msgstr ""
1212
"POT-Creation-Date: 2016-01-19 14:46+0000\n"
1313
"PO-Revision-Date: 2016-02-16 12:32+0000\n"
1414
"Last-Translator: Antonio Trueba\n"
15-
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-9-0/language/es/)\n"
15+
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-9-0/"
16+
"language/es/)\n"
17+
"Language: es\n"
1618
"MIME-Version: 1.0\n"
1719
"Content-Type: text/plain; charset=UTF-8\n"
1820
"Content-Transfer-Encoding: \n"
19-
"Language: es\n"
2021
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2122

2223
#. module: users_ldap_mail
2324
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
2425
msgid ""
2526
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
2627
"instead."
27-
msgstr "Por defecto se usa «cn». En Directorio Activo se podría usar «displayName» en su lugar."
28+
msgstr ""
29+
"Por defecto se usa «cn». En Directorio Activo se podría usar «displayName» "
30+
"en su lugar."
2831

2932
#. module: users_ldap_mail
3033
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute

users_ldap_mail/i18n/fr.po

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
33
# * users_ldap_mail
4-
#
4+
#
55
# Translators:
66
msgid ""
77
msgstr ""
@@ -10,11 +10,12 @@ msgstr ""
1010
"POT-Creation-Date: 2016-01-19 14:46+0000\n"
1111
"PO-Revision-Date: 2015-12-13 15:21+0000\n"
1212
"Last-Translator: <>\n"
13-
"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-9-0/language/fr/)\n"
13+
"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-9-0/"
14+
"language/fr/)\n"
15+
"Language: fr\n"
1416
"MIME-Version: 1.0\n"
1517
"Content-Type: text/plain; charset=UTF-8\n"
1618
"Content-Transfer-Encoding: \n"
17-
"Language: fr\n"
1819
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
1920

2021
#. module: users_ldap_mail

users_ldap_mail/i18n/hr.po

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
33
# * users_ldap_mail
4-
#
4+
#
55
# Translators:
66
# OCA Transbot <[email protected]>, 2017
77
# Bole <[email protected]>, 2017
@@ -13,11 +13,12 @@ msgstr ""
1313
"PO-Revision-Date: 2017-05-10 00:47+0000\n"
1414
"Last-Translator: Bole <[email protected]>, 2017\n"
1515
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
16+
"Language: hr\n"
1617
"MIME-Version: 1.0\n"
1718
"Content-Type: text/plain; charset=UTF-8\n"
1819
"Content-Transfer-Encoding: \n"
19-
"Language: hr\n"
20-
"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"
20+
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
21+
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
2122

2223
#. module: users_ldap_mail
2324
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute

users_ldap_mail/i18n/hr_HR.po

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
33
# * users_ldap_mail
4-
#
4+
#
55
# Translators:
66
# Bole <[email protected]>, 2016
77
msgid ""
@@ -11,19 +11,22 @@ msgstr ""
1111
"POT-Creation-Date: 2016-06-09 12:31+0000\n"
1212
"PO-Revision-Date: 2016-05-31 20:13+0000\n"
1313
"Last-Translator: Bole <[email protected]>\n"
14-
"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-server-tools-9-0/language/hr_HR/)\n"
14+
"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-server-"
15+
"tools-9-0/language/hr_HR/)\n"
16+
"Language: hr_HR\n"
1517
"MIME-Version: 1.0\n"
1618
"Content-Type: text/plain; charset=UTF-8\n"
1719
"Content-Transfer-Encoding: \n"
18-
"Language: hr_HR\n"
19-
"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"
20+
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
21+
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
2022

2123
#. module: users_ldap_mail
2224
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
2325
msgid ""
2426
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
2527
"instead."
26-
msgstr "Zadano koristi 'cn'. Za ActiveDirectory možete koristiti i 'displayName'."
28+
msgstr ""
29+
"Zadano koristi 'cn'. Za ActiveDirectory možete koristiti i 'displayName'."
2730

2831
#. module: users_ldap_mail
2932
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute

users_ldap_mail/i18n/pt_BR.po

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
33
# * users_ldap_mail
4-
#
4+
#
55
# Translators:
66
# Armando Vulcano Junior <[email protected]>, 2015
77
msgid ""
@@ -11,19 +11,21 @@ msgstr ""
1111
"POT-Creation-Date: 2015-12-15 01:55+0000\n"
1212
"PO-Revision-Date: 2015-12-13 15:21+0000\n"
1313
"Last-Translator: OCA Transbot <[email protected]>\n"
14-
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-tools-9-0/language/pt_BR/)\n"
14+
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-"
15+
"tools-9-0/language/pt_BR/)\n"
16+
"Language: pt_BR\n"
1517
"MIME-Version: 1.0\n"
1618
"Content-Type: text/plain; charset=UTF-8\n"
1719
"Content-Transfer-Encoding: \n"
18-
"Language: pt_BR\n"
1920
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
2021

2122
#. module: users_ldap_mail
2223
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
2324
msgid ""
2425
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
2526
"instead."
26-
msgstr "Por padrão 'cn' é usado. Para ActiveDirectory você pode usar 'displayName'"
27+
msgstr ""
28+
"Por padrão 'cn' é usado. Para ActiveDirectory você pode usar 'displayName'"
2729

2830
#. module: users_ldap_mail
2931
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute

users_ldap_mail/i18n/sl.po

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
33
# * users_ldap_mail
4-
#
4+
#
55
# Translators:
66
# Matjaž Mozetič <[email protected]>, 2015
77
msgid ""
@@ -11,19 +11,23 @@ msgstr ""
1111
"POT-Creation-Date: 2015-12-15 01:55+0000\n"
1212
"PO-Revision-Date: 2015-12-14 06:46+0000\n"
1313
"Last-Translator: Matjaž Mozetič <[email protected]>\n"
14-
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-9-0/language/sl/)\n"
14+
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-9-0/"
15+
"language/sl/)\n"
16+
"Language: sl\n"
1517
"MIME-Version: 1.0\n"
1618
"Content-Type: text/plain; charset=UTF-8\n"
1719
"Content-Transfer-Encoding: \n"
18-
"Language: sl\n"
19-
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
20+
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
21+
"%100==4 ? 2 : 3);\n"
2022

2123
#. module: users_ldap_mail
2224
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
2325
msgid ""
2426
"By default 'cn' is used. For ActiveDirectory you might use 'displayName' "
2527
"instead."
26-
msgstr "Privzeto se uporablja 'cn'. Za aktivni imenik bi lahko namesto tega uporabili 'displayName'."
28+
msgstr ""
29+
"Privzeto se uporablja 'cn'. Za aktivni imenik bi lahko namesto tega "
30+
"uporabili 'displayName'."
2731

2832
#. module: users_ldap_mail
2933
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * users_ldap_mail
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 11.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: <>\n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: users_ldap_mail
17+
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_name_attribute
18+
msgid "By default 'cn' is used. For ActiveDirectory you might use 'displayName' instead."
19+
msgstr ""
20+
21+
#. module: users_ldap_mail
22+
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_mail_attribute
23+
msgid "E-mail attribute"
24+
msgstr ""
25+
26+
#. module: users_ldap_mail
27+
#: model:ir.model.fields,help:users_ldap_mail.field_res_company_ldap_mail_attribute
28+
msgid "LDAP attribute to use to retrieve em-mail address."
29+
msgstr ""
30+
31+
#. module: users_ldap_mail
32+
#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap_name_attribute
33+
msgid "Name Attribute"
34+
msgstr ""
35+
36+
#. module: users_ldap_mail
37+
#: model:ir.model,name:users_ldap_mail.model_res_company_ldap
38+
msgid "res.company.ldap"
39+
msgstr ""
40+

users_ldap_mail/i18n/zh_CN.po

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Translation of Odoo Server.
22
# This file contains the translation of the following modules:
33
# * users_ldap_mail
4-
#
4+
#
55
# Translators:
66
# Jeffery Chenn <[email protected]>, 2016
77
msgid ""
@@ -11,11 +11,12 @@ msgstr ""
1111
"POT-Creation-Date: 2016-08-31 11:58+0000\n"
1212
"PO-Revision-Date: 2016-09-04 06:11+0000\n"
1313
"Last-Translator: Jeffery Chenn <[email protected]>\n"
14-
"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-server-tools-9-0/language/zh_CN/)\n"
14+
"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-server-"
15+
"tools-9-0/language/zh_CN/)\n"
16+
"Language: zh_CN\n"
1517
"MIME-Version: 1.0\n"
1618
"Content-Type: text/plain; charset=UTF-8\n"
1719
"Content-Transfer-Encoding: \n"
18-
"Language: zh_CN\n"
1920
"Plural-Forms: nplurals=1; plural=0;\n"
2021

2122
#. module: users_ldap_mail

users_ldap_mail/models/users_ldap_model.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ class CompanyLDAP(models.Model):
1111
_inherit = 'res.company.ldap'
1212

1313
name_attribute = fields.Char(
14-
'Name Attribute', _defaults='cn',
14+
'Name Attribute',
15+
default='cn',
1516
help="By default 'cn' is used. "
16-
"For ActiveDirectory you might use 'displayName' instead.")
17+
"For ActiveDirectory you might use 'displayName' instead.",
18+
)
1719
mail_attribute = fields.Char(
18-
'E-mail attribute', _defaults='mail',
19-
help="LDAP attribute to use to retrieve em-mail address.")
20+
'E-mail attribute',
21+
default='mail',
22+
help="LDAP attribute to use to retrieve em-mail address.",
23+
)
2024

2125
def get_ldap_dicts(self):
2226
"""

0 commit comments

Comments
 (0)