diff --git a/pandoc-3.3-1-amd64.deb b/pandoc-3.3-1-amd64.deb new file mode 100644 index 0000000000..65e9c2d900 Binary files /dev/null and b/pandoc-3.3-1-amd64.deb differ diff --git a/users_ldap_mail/README.rst b/users_ldap_mail/README.rst new file mode 100644 index 0000000000..cd996a1d49 --- /dev/null +++ b/users_ldap_mail/README.rst @@ -0,0 +1,111 @@ +===================================== +LDAP mapping for user name and e-mail +===================================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:2f2d14de733d4de9426f09be282f85343c8478e2456b54e04f3dc41bc0e45cb1 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github + :target: https://github.com/OCA/server-auth/tree/17.0/users_ldap_mail + :alt: OCA/server-auth +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-auth-17-0/server-auth-17-0-users_ldap_mail + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of the auth_ldap module to support +mail from LDAP and to allow you to get an e-mail address from LDAP +accounts to Odoo users. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +1. Open Odoo in your browser +2. Go to **Settings > General Settings** +3. In the **Integrations** section click on **LDAP Server** under **LDAP + Authentication**. This will allow you to create your LDAP integration + settings. +4. When creating or editing a record, under the **Process Parameter** + section there are two new fields: mail and name, the name of these + items will correspond with a new user that is created, when a user + logs in via LDAP in Odoo. + +Known issues / Roadmap +====================== + +- Add tests (use LDAP Mocking through something like + https://mockldap.readthedocs.io/en/latest/overview.html) + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Daniel Reis + +Contributors +------------ + +- Daniel Reis (https://launchpad.com/~dreis-pt), +- `Tecnativa `__: + + - Alexandre Díaz + - João Marques + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-joao-p-marques| image:: https://github.com/joao-p-marques.png?size=40px + :target: https://github.com/joao-p-marques + :alt: joao-p-marques + +Current `maintainer `__: + +|maintainer-joao-p-marques| + +This module is part of the `OCA/server-auth `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/users_ldap_mail/__init__.py b/users_ldap_mail/__init__.py new file mode 100644 index 0000000000..0c016115c8 --- /dev/null +++ b/users_ldap_mail/__init__.py @@ -0,0 +1,4 @@ +# Copyright Daniel Reis (https://launchpad.com/~dreis-pt) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/users_ldap_mail/__manifest__.py b/users_ldap_mail/__manifest__.py new file mode 100644 index 0000000000..6a66bfae82 --- /dev/null +++ b/users_ldap_mail/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright Daniel Reis (https://launchpad.com/~dreis-pt) +# Copyright 2021 Tecnativa - João Marques +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "LDAP mapping for user name and e-mail", + "version": "17.0.1.0.0", + "depends": ["auth_ldap"], + "author": "Daniel Reis," "Odoo Community Association (OCA)", + "maintainers": ["joao-p-marques"], + "website": "https://github.com/OCA/server-auth", + "license": "AGPL-3", + "category": "Tools", + "data": ["views/res_company_ldap.xml"], + "installable": True, +} diff --git a/users_ldap_mail/i18n/de.po b/users_ldap_mail/i18n/de.po new file mode 100644 index 0000000000..31d605a194 --- /dev/null +++ b/users_ldap_mail/i18n/de.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +# Translators: +# Rudolf Schnapka , 2016 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-17 12:15+0000\n" +"PO-Revision-Date: 2016-04-21 09:16+0000\n" +"Last-Translator: Rudolf Schnapka \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" +"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." + +#. module: users_ldap_mail +#: model:ir.model,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +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 "Email-Attribut" + +#. 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 e-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 "Namens-Attribut" + +#~ msgid "LDAP attribute to use to retrieve em-mail address." +#~ msgstr "LDAP-Attribut, um eine Email-Adresse zu erhalten." + +#~ msgid "res.company.ldap" +#~ msgstr "res.company.ldap" diff --git a/users_ldap_mail/i18n/es.po b/users_ldap_mail/i18n/es.po new file mode 100644 index 0000000000..d253f90862 --- /dev/null +++ b/users_ldap_mail/i18n/es.po @@ -0,0 +1,58 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +# Translators: +# Antonio Trueba, 2016 +# Antonio Trueba, 2016 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-19 14:46+0000\n" +"PO-Revision-Date: 2023-09-02 19:25+0000\n" +"Last-Translator: Ivorra78 \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" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\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." + +#. module: users_ldap_mail +#: model:ir.model,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "Configuración LDAP de la Compañía" + +#. module: users_ldap_mail +#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap__mail_attribute +msgid "E-mail attribute" +msgstr "Atributo e-mail" + +#. 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 e-mail address." +msgstr "" +"Atributo LDAP a utilizar para recuperar la dirección de correo electrónico." + +#. module: users_ldap_mail +#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap__name_attribute +msgid "Name Attribute" +msgstr "Atributo Nombre" + +#~ msgid "LDAP attribute to use to retrieve em-mail address." +#~ msgstr "Atributo LDAP a utilizar para recumerar la dirección em-mail." + +#~ msgid "res.company.ldap" +#~ msgstr "res.company.ldap" diff --git a/users_ldap_mail/i18n/fr.po b/users_ldap_mail/i18n/fr.po new file mode 100644 index 0000000000..43b93a231e --- /dev/null +++ b/users_ldap_mail/i18n/fr.po @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"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: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \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 "" + +#. module: users_ldap_mail +#: model:ir.model,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +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 e-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 "" + +#~ msgid "res.company.ldap" +#~ msgstr "res.company.ldap" diff --git a/users_ldap_mail/i18n/hr.po b/users_ldap_mail/i18n/hr.po new file mode 100644 index 0000000000..c9ea31e6db --- /dev/null +++ b/users_ldap_mail/i18n/hr.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +# Translators: +# OCA Transbot , 2017 +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-10 00:47+0000\n" +"PO-Revision-Date: 2017-05-10 00:47+0000\n" +"Last-Translator: Bole , 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" +"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 se koristi 'CN'. za ActiveDirectory možete koristiti 'displayName' " +"umjesto zadanog." + +#. module: users_ldap_mail +#: model:ir.model,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +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 "Atribut e-mail" + +#. 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 e-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 "Atribut naziva" + +#~ msgid "LDAP attribute to use to retrieve em-mail address." +#~ msgstr "LDAP atribut za dohvat email adresa." + +#~ msgid "res.company.ldap" +#~ msgstr "res.company.ldap" diff --git a/users_ldap_mail/i18n/hr_HR.po b/users_ldap_mail/i18n/hr_HR.po new file mode 100644 index 0000000000..37966e5b73 --- /dev/null +++ b/users_ldap_mail/i18n/hr_HR.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +# Translators: +# Bole , 2016 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-06-09 12:31+0000\n" +"PO-Revision-Date: 2016-05-31 20:13+0000\n" +"Last-Translator: Bole \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" +"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'." + +#. module: users_ldap_mail +#: model:ir.model,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +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 "E-mail atribut" + +#. 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 e-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 "Atribut Naziv" + +#~ msgid "LDAP attribute to use to retrieve em-mail address." +#~ msgstr "LDAP atribut za dohvaćanje e-mail adrese." + +#~ msgid "res.company.ldap" +#~ msgstr "res.company.ldap" diff --git a/users_ldap_mail/i18n/it.po b/users_ldap_mail/i18n/it.po new file mode 100644 index 0000000000..6f42d6e7e4 --- /dev/null +++ b/users_ldap_mail/i18n/it.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2024-01-03 14:33+0000\n" +"Last-Translator: mymage \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\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 "" +"In modo predefinito viene usato \"cn\". Per ActiveDirectory potrebbe invece " +"essere utilizzato \"displayName\"." + +#. module: users_ldap_mail +#: model:ir.model,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "Configurazione LDAP azienda" + +#. module: users_ldap_mail +#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap__mail_attribute +msgid "E-mail attribute" +msgstr "Attributo email" + +#. 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 e-mail address." +msgstr "Attributo LDAP da utilizzare per il recupero degli indirizzi e-mail." + +#. module: users_ldap_mail +#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap__name_attribute +msgid "Name Attribute" +msgstr "Attributo del nome" diff --git a/users_ldap_mail/i18n/pt_BR.po b/users_ldap_mail/i18n/pt_BR.po new file mode 100644 index 0000000000..d4570eb63d --- /dev/null +++ b/users_ldap_mail/i18n/pt_BR.po @@ -0,0 +1,53 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +# Translators: +# Armando Vulcano Junior , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-12-15 01:55+0000\n" +"PO-Revision-Date: 2024-05-22 02:01+0000\n" +"Last-Translator: Rodrigo Macedo \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" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.17\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'" + +#. module: users_ldap_mail +#: model:ir.model,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "Configuração LDAP da empresa" + +#. module: users_ldap_mail +#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap__mail_attribute +msgid "E-mail attribute" +msgstr "Atributo E-mail" + +#. 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 e-mail address." +msgstr "Atributo LDAP a ser usado para recuperar o endereço de e-mail." + +#. module: users_ldap_mail +#: model:ir.model.fields,field_description:users_ldap_mail.field_res_company_ldap__name_attribute +msgid "Name Attribute" +msgstr "Atributo Nome" + +#~ msgid "LDAP attribute to use to retrieve em-mail address." +#~ msgstr "Use o atributo LDAP para recuperar o endereço de e-mail" diff --git a/users_ldap_mail/i18n/sl.po b/users_ldap_mail/i18n/sl.po new file mode 100644 index 0000000000..c023a00dba --- /dev/null +++ b/users_ldap_mail/i18n/sl.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-12-15 01:55+0000\n" +"PO-Revision-Date: 2015-12-14 06:46+0000\n" +"Last-Translator: Matjaž Mozetič \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" +"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'." + +#. module: users_ldap_mail +#: model:ir.model,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +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 "E-poštni atribut" + +#. 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 e-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 "Naziv atributa" + +#~ msgid "LDAP attribute to use to retrieve em-mail address." +#~ msgstr "LDAP atribut za uporabo pri pridobivanju e-poštnih naslovov." + +#~ msgid "res.company.ldap" +#~ msgstr "res.company.ldap" diff --git a/users_ldap_mail/i18n/users_ldap_mail.pot b/users_ldap_mail/i18n/users_ldap_mail.pot new file mode 100644 index 0000000000..19632be3f6 --- /dev/null +++ b/users_ldap_mail/i18n/users_ldap_mail.pot @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +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 e-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 "" diff --git a/users_ldap_mail/i18n/zh_CN.po b/users_ldap_mail/i18n/zh_CN.po new file mode 100644 index 0000000000..d90f9ce396 --- /dev/null +++ b/users_ldap_mail/i18n/zh_CN.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_mail +# +# Translators: +# Jeffery Chenn , 2016 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-31 11:58+0000\n" +"PO-Revision-Date: 2016-09-04 06:11+0000\n" +"Last-Translator: Jeffery Chenn \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" +"Plural-Forms: nplurals=1; plural=0;\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,name:users_ldap_mail.model_res_company_ldap +msgid "Company LDAP configuration" +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 "E-mail 属性" + +#. 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 e-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 "名称属性" diff --git a/users_ldap_mail/models/__init__.py b/users_ldap_mail/models/__init__.py new file mode 100644 index 0000000000..4a58f52e68 --- /dev/null +++ b/users_ldap_mail/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright Daniel Reis (https://launchpad.com/~dreis-pt) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import users_ldap_model diff --git a/users_ldap_mail/models/users_ldap_model.py b/users_ldap_mail/models/users_ldap_model.py new file mode 100644 index 0000000000..a894312719 --- /dev/null +++ b/users_ldap_mail/models/users_ldap_model.py @@ -0,0 +1,51 @@ +# Copyright Daniel Reis (https://launchpad.com/~dreis-pt) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +import logging + +from odoo import fields, models, tools + +_logger = logging.getLogger(__name__) + + +class CompanyLDAP(models.Model): + _inherit = "res.company.ldap" + + name_attribute = fields.Char( + default="cn", + help="By default 'cn' is used. " + "For ActiveDirectory you might use 'displayName' instead.", + ) + mail_attribute = fields.Char( + "E-mail attribute", + default="mail", + help="LDAP attribute to use to retrieve e-mail address.", + ) + + def _get_ldap_dicts(self): + """ + Copy of auth_ldap's funtion, changing only the SQL, so that it returns + all fields in the table. + """ + return ( + self.sudo() + .search([("ldap_server", "!=", False)], order="sequence") + .read([]) + ) + + def _map_ldap_attributes(self, conf, login, ldap_entry): + values = super()._map_ldap_attributes(conf, login, ldap_entry) + mapping = [ + ("name", "name_attribute"), + ("email", "mail_attribute"), + ] + for value_key, conf_name in mapping: + try: + if conf[conf_name]: + values[value_key] = tools.ustr(ldap_entry[1][conf[conf_name]][0]) + except KeyError: + _logger.warning( + f'No LDAP attribute "{conf.get(conf_name)}" found for ' + f'login "{values.get("login")}"' + ) + return values diff --git a/users_ldap_mail/pyproject.toml b/users_ldap_mail/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/users_ldap_mail/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/users_ldap_mail/readme/CONTRIBUTORS.md b/users_ldap_mail/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..470c93107d --- /dev/null +++ b/users_ldap_mail/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- Daniel Reis (), +- [Tecnativa](https://www.tecnativa.com): + - Alexandre Díaz + - João Marques diff --git a/users_ldap_mail/readme/DESCRIPTION.md b/users_ldap_mail/readme/DESCRIPTION.md new file mode 100644 index 0000000000..fda69f4308 --- /dev/null +++ b/users_ldap_mail/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This module extends the functionality of the auth_ldap module to support +mail from LDAP and to allow you to get an e-mail address from LDAP +accounts to Odoo users. diff --git a/users_ldap_mail/readme/ROADMAP.md b/users_ldap_mail/readme/ROADMAP.md new file mode 100644 index 0000000000..ba9c635b3a --- /dev/null +++ b/users_ldap_mail/readme/ROADMAP.md @@ -0,0 +1,2 @@ +- Add tests (use LDAP Mocking through something like + ) diff --git a/users_ldap_mail/readme/USAGE.md b/users_ldap_mail/readme/USAGE.md new file mode 100644 index 0000000000..8819fbf48c --- /dev/null +++ b/users_ldap_mail/readme/USAGE.md @@ -0,0 +1,11 @@ +To use this module, you need to: + +1. Open Odoo in your browser +2. Go to **Settings \> General Settings** +3. In the **Integrations** section click on **LDAP Server** under + **LDAP Authentication**. This will allow you to create your LDAP + integration settings. +4. When creating or editing a record, under the **Process Parameter** + section there are two new fields: mail and name, the name of these + items will correspond with a new user that is created, when a user + logs in via LDAP in Odoo. diff --git a/users_ldap_mail/static/description/icon.png b/users_ldap_mail/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/users_ldap_mail/static/description/icon.png differ diff --git a/users_ldap_mail/static/description/index.html b/users_ldap_mail/static/description/index.html new file mode 100644 index 0000000000..26d416eb5c --- /dev/null +++ b/users_ldap_mail/static/description/index.html @@ -0,0 +1,456 @@ + + + + + +LDAP mapping for user name and e-mail + + + +
+

LDAP mapping for user name and e-mail

+ + +

Beta License: AGPL-3 OCA/server-auth Translate me on Weblate Try me on Runboat

+

This module extends the functionality of the auth_ldap module to support +mail from LDAP and to allow you to get an e-mail address from LDAP +accounts to Odoo users.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  1. Open Odoo in your browser
  2. +
  3. Go to Settings > General Settings
  4. +
  5. In the Integrations section click on LDAP Server under LDAP +Authentication. This will allow you to create your LDAP integration +settings.
  6. +
  7. When creating or editing a record, under the Process Parameter +section there are two new fields: mail and name, the name of these +items will correspond with a new user that is created, when a user +logs in via LDAP in Odoo.
  8. +
+
+
+

Known issues / Roadmap

+ +
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Daniel Reis
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

joao-p-marques

+

This module is part of the OCA/server-auth project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/users_ldap_mail/views/res_company_ldap.xml b/users_ldap_mail/views/res_company_ldap.xml new file mode 100644 index 0000000000..a1e2bb2c3e --- /dev/null +++ b/users_ldap_mail/views/res_company_ldap.xml @@ -0,0 +1,14 @@ + + + + res.company.ldap.form + res.company.ldap + + + + + + + + +