From 70b8cad7be8c203aa7d78306d573e82e9166c1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Pigeon?= Date: Wed, 14 Jun 2017 16:49:01 +0200 Subject: [PATCH 1/3] [10.0] add new module to manage technical user on company [CHG] add name to wml tag to make override easier [FIX] remove domain on active field --- base_technical_user/README.rst | 49 +++++++++++++++++++ base_technical_user/__init__.py | 2 + base_technical_user/__manifest__.py | 20 ++++++++ base_technical_user/models/__init__.py | 2 + base_technical_user/models/res_company.py | 14 ++++++ .../views/res_company_view.xml | 20 ++++++++ 6 files changed, 107 insertions(+) create mode 100644 base_technical_user/README.rst create mode 100644 base_technical_user/__init__.py create mode 100644 base_technical_user/__manifest__.py create mode 100644 base_technical_user/models/__init__.py create mode 100644 base_technical_user/models/res_company.py create mode 100644 base_technical_user/views/res_company_view.xml diff --git a/base_technical_user/README.rst b/base_technical_user/README.rst new file mode 100644 index 000000000..d68044f45 --- /dev/null +++ b/base_technical_user/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +=================== +Base Technical User +=================== + +This module extends the functionality of company management. +It allows you to bind a technical user on the company in order to use it in +batch processes. + +The technical user must +- be inactive to avoid login +- be in the required groups depending of what you need to do + +Usage +===== + +If you install the module, you will find a tab on the company form allowing +to define the technical user. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Cédric Pigeon + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit http://odoo-community.org. \ No newline at end of file diff --git a/base_technical_user/__init__.py b/base_technical_user/__init__.py new file mode 100644 index 000000000..a0fdc10fe --- /dev/null +++ b/base_technical_user/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import models diff --git a/base_technical_user/__manifest__.py b/base_technical_user/__manifest__.py new file mode 100644 index 000000000..9f91e7618 --- /dev/null +++ b/base_technical_user/__manifest__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 ACSONE SA/NV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + 'name': "Base Technical User", + 'summary': """ + Add a technical user parameter on the company """, + 'author': 'ACSONE SA/NV, Odoo Community Association (OCA)', + 'website': "http://acsone.eu", + 'category': 'Hidden/Dependency', + 'version': '10.0.1.0.0', + 'license': 'AGPL-3', + 'depends': [ + 'base', + ], + 'data': [ + 'views/res_company_view.xml' + ], + 'installable': True +} diff --git a/base_technical_user/models/__init__.py b/base_technical_user/models/__init__.py new file mode 100644 index 000000000..88de5f995 --- /dev/null +++ b/base_technical_user/models/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +from . import res_company diff --git a/base_technical_user/models/res_company.py b/base_technical_user/models/res_company.py new file mode 100644 index 000000000..af30a3761 --- /dev/null +++ b/base_technical_user/models/res_company.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 ACSONE SA/NV () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models, fields + + +class ResCompany(models.Model): + _inherit = 'res.company' + + user_tech_id = fields.Many2one( + comodel_name="res.users", + string="Technical User", + help="This user can be used by process for technical purpose", + domain="[('company_id', '=', id)]") diff --git a/base_technical_user/views/res_company_view.xml b/base_technical_user/views/res_company_view.xml new file mode 100644 index 000000000..032751b11 --- /dev/null +++ b/base_technical_user/views/res_company_view.xml @@ -0,0 +1,20 @@ + + + + res.company.form (base_technical_user) + res.company + + 20 + + + + + + + + + + + + + From 190d400572ff3d22240c7edacc2cae85c78685ba Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 2 Dec 2017 12:26:41 +0100 Subject: [PATCH 2/3] OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex --- base_technical_user/i18n/de.po | 44 +++++++++++++++++++++++++++++++ base_technical_user/i18n/es.po | 44 +++++++++++++++++++++++++++++++ base_technical_user/i18n/fr.po | 44 +++++++++++++++++++++++++++++++ base_technical_user/i18n/hr.po | 44 +++++++++++++++++++++++++++++++ base_technical_user/i18n/it.po | 44 +++++++++++++++++++++++++++++++ base_technical_user/i18n/nl_NL.po | 44 +++++++++++++++++++++++++++++++ base_technical_user/i18n/pt.po | 44 +++++++++++++++++++++++++++++++ 7 files changed, 308 insertions(+) create mode 100644 base_technical_user/i18n/de.po create mode 100644 base_technical_user/i18n/es.po create mode 100644 base_technical_user/i18n/fr.po create mode 100644 base_technical_user/i18n/hr.po create mode 100644 base_technical_user/i18n/it.po create mode 100644 base_technical_user/i18n/nl_NL.po create mode 100644 base_technical_user/i18n/pt.po diff --git a/base_technical_user/i18n/de.po b/base_technical_user/i18n/de.po new file mode 100644 index 000000000..b951dd7b4 --- /dev/null +++ b/base_technical_user/i18n/de.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_technical_user +# +# Translators: +# Niki Waibel , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-01 02:10+0000\n" +"PO-Revision-Date: 2017-12-01 02:10+0000\n" +"Last-Translator: Niki Waibel , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/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: base_technical_user +#: model:ir.model,name:base_technical_user.model_res_company +msgid "Companies" +msgstr "Unternehmen" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Configuration" +msgstr "" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Technical Parameters" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,field_description:base_technical_user.field_res_company_user_tech_id +msgid "Technical User" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,help:base_technical_user.field_res_company_user_tech_id +msgid "This user can be used by process for technical purpose" +msgstr "" diff --git a/base_technical_user/i18n/es.po b/base_technical_user/i18n/es.po new file mode 100644 index 000000000..397d121e8 --- /dev/null +++ b/base_technical_user/i18n/es.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_technical_user +# +# Translators: +# Pedro M. Baeza , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-01 02:10+0000\n" +"PO-Revision-Date: 2017-12-01 02:10+0000\n" +"Last-Translator: Pedro M. Baeza , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/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: base_technical_user +#: model:ir.model,name:base_technical_user.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Configuration" +msgstr "" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Technical Parameters" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,field_description:base_technical_user.field_res_company_user_tech_id +msgid "Technical User" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,help:base_technical_user.field_res_company_user_tech_id +msgid "This user can be used by process for technical purpose" +msgstr "" diff --git a/base_technical_user/i18n/fr.po b/base_technical_user/i18n/fr.po new file mode 100644 index 000000000..6f8f8fdfc --- /dev/null +++ b/base_technical_user/i18n/fr.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_technical_user +# +# Translators: +# Quentin THEURET , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-01 02:10+0000\n" +"PO-Revision-Date: 2017-12-01 02:10+0000\n" +"Last-Translator: Quentin THEURET , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/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: base_technical_user +#: model:ir.model,name:base_technical_user.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Configuration" +msgstr "" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Technical Parameters" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,field_description:base_technical_user.field_res_company_user_tech_id +msgid "Technical User" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,help:base_technical_user.field_res_company_user_tech_id +msgid "This user can be used by process for technical purpose" +msgstr "" diff --git a/base_technical_user/i18n/hr.po b/base_technical_user/i18n/hr.po new file mode 100644 index 000000000..1e62ec532 --- /dev/null +++ b/base_technical_user/i18n/hr.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_technical_user +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-01 02:10+0000\n" +"PO-Revision-Date: 2017-12-01 02:10+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/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" + +#. module: base_technical_user +#: model:ir.model,name:base_technical_user.model_res_company +msgid "Companies" +msgstr "Tvrtke" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Configuration" +msgstr "Postavke" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Technical Parameters" +msgstr "Tehnički parametri" + +#. module: base_technical_user +#: model:ir.model.fields,field_description:base_technical_user.field_res_company_user_tech_id +msgid "Technical User" +msgstr "Tehnički korisnik" + +#. module: base_technical_user +#: model:ir.model.fields,help:base_technical_user.field_res_company_user_tech_id +msgid "This user can be used by process for technical purpose" +msgstr "Ovaj korisnik može biti korišten od strane procesa u tehničke svrhe" diff --git a/base_technical_user/i18n/it.po b/base_technical_user/i18n/it.po new file mode 100644 index 000000000..8c4887689 --- /dev/null +++ b/base_technical_user/i18n/it.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_technical_user +# +# Translators: +# Paolo Valier , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-06 02:25+0000\n" +"PO-Revision-Date: 2018-01-06 02:25+0000\n" +"Last-Translator: Paolo Valier , 2017\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_technical_user +#: model:ir.model,name:base_technical_user.model_res_company +msgid "Companies" +msgstr "Aziende" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Configuration" +msgstr "Configurazione" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Technical Parameters" +msgstr "Parametri Tecnici" + +#. module: base_technical_user +#: model:ir.model.fields,field_description:base_technical_user.field_res_company_user_tech_id +msgid "Technical User" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,help:base_technical_user.field_res_company_user_tech_id +msgid "This user can be used by process for technical purpose" +msgstr "" diff --git a/base_technical_user/i18n/nl_NL.po b/base_technical_user/i18n/nl_NL.po new file mode 100644 index 000000000..8828e0b89 --- /dev/null +++ b/base_technical_user/i18n/nl_NL.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_technical_user +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-01 02:10+0000\n" +"PO-Revision-Date: 2017-12-01 02:10+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_technical_user +#: model:ir.model,name:base_technical_user.model_res_company +msgid "Companies" +msgstr "Bedrijven" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Configuration" +msgstr "" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Technical Parameters" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,field_description:base_technical_user.field_res_company_user_tech_id +msgid "Technical User" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,help:base_technical_user.field_res_company_user_tech_id +msgid "This user can be used by process for technical purpose" +msgstr "" diff --git a/base_technical_user/i18n/pt.po b/base_technical_user/i18n/pt.po new file mode 100644 index 000000000..a21bb45a4 --- /dev/null +++ b/base_technical_user/i18n/pt.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_technical_user +# +# Translators: +# Pedro Castro Silva , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-01 02:10+0000\n" +"PO-Revision-Date: 2017-12-01 02:10+0000\n" +"Last-Translator: Pedro Castro Silva , 2017\n" +"Language-Team: Portuguese (https://www.transifex.com/oca/teams/23907/pt/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: base_technical_user +#: model:ir.model,name:base_technical_user.model_res_company +msgid "Companies" +msgstr "Empresas" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Configuration" +msgstr "" + +#. module: base_technical_user +#: model:ir.ui.view,arch_db:base_technical_user.res_company_view_form_inherit_base_technical_user +msgid "Technical Parameters" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,field_description:base_technical_user.field_res_company_user_tech_id +msgid "Technical User" +msgstr "" + +#. module: base_technical_user +#: model:ir.model.fields,help:base_technical_user.field_res_company_user_tech_id +msgid "This user can be used by process for technical purpose" +msgstr "" From 10e1829a97a97baff34c0e003bd5306b6917bb82 Mon Sep 17 00:00:00 2001 From: Hugo Santos Date: Wed, 7 Feb 2018 18:13:20 +0100 Subject: [PATCH 3/3] [MIG] base_technical_user to V11 --- base_technical_user/README.rst | 8 ++++++-- base_technical_user/__init__.py | 1 - base_technical_user/__manifest__.py | 3 +-- base_technical_user/models/__init__.py | 1 - base_technical_user/models/res_company.py | 1 - 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/base_technical_user/README.rst b/base_technical_user/README.rst index d68044f45..cd3cbe932 100644 --- a/base_technical_user/README.rst +++ b/base_technical_user/README.rst @@ -1,5 +1,5 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl :alt: License: AGPL-3 =================== @@ -20,6 +20,10 @@ Usage If you install the module, you will find a tab on the company form allowing to define the technical user. +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/149/11.0 + Credits ======= diff --git a/base_technical_user/__init__.py b/base_technical_user/__init__.py index a0fdc10fe..0650744f6 100644 --- a/base_technical_user/__init__.py +++ b/base_technical_user/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import models diff --git a/base_technical_user/__manifest__.py b/base_technical_user/__manifest__.py index 9f91e7618..55712e9a3 100644 --- a/base_technical_user/__manifest__.py +++ b/base_technical_user/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { @@ -8,7 +7,7 @@ 'author': 'ACSONE SA/NV, Odoo Community Association (OCA)', 'website': "http://acsone.eu", 'category': 'Hidden/Dependency', - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'license': 'AGPL-3', 'depends': [ 'base', diff --git a/base_technical_user/models/__init__.py b/base_technical_user/models/__init__.py index 88de5f995..aff44f335 100644 --- a/base_technical_user/models/__init__.py +++ b/base_technical_user/models/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- from . import res_company diff --git a/base_technical_user/models/res_company.py b/base_technical_user/models/res_company.py index af30a3761..625e08933 100644 --- a/base_technical_user/models/res_company.py +++ b/base_technical_user/models/res_company.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields