diff --git a/auth_dynamic_groups/README.rst b/auth_dynamic_groups/README.rst new file mode 100644 index 0000000000..955659b1c9 --- /dev/null +++ b/auth_dynamic_groups/README.rst @@ -0,0 +1,107 @@ +============== +Dynamic groups +============== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/10.0/auth_dynamic_groups + :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-10-0/server-auth-10-0-auth_dynamic_groups + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/251/10.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows defining groups whose membership is a condition expressed as +python code. For every user, it is evaluated during login if she belongs to +the group or not. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +Check `Dynamic` on a group you want to be dynamic. Now fill in the condition, +using `user` which is a browse record of the user in question that evaluates +truthy if the user is supposed to be a member of the group and falsy if not. + +There is a constraint on the field to check for validity if this expression. +When you're satisfied, click the button `Evaluate` to prefill the group's +members. The condition will be checked now for every user who logs in. + +Usage +===== + +We have a group called `Amsterdam` and want it to contain all users from +city of Amsterdam. So we use the membership condition + +.. code:: python + + user.partner_id.city == 'Amsterdam' + +Now we can be sure every user living in this city is in the right group, and we +can start assigning local menus to it, adjust permissions, etc. Keep in mind +that view overrides can also be restricted by a group id, this gives a lot of +possibilities to dynamically adapt views based on arbitrary properties +reachable via the user record. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Therp BV + +Contributors +~~~~~~~~~~~~ + +* Holger Brunn + +Other credits +~~~~~~~~~~~~~ + +* Odoo Community Association: `Icon `_. + +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. + +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/auth_dynamic_groups/__init__.py b/auth_dynamic_groups/__init__.py new file mode 100644 index 0000000000..9732283c2f --- /dev/null +++ b/auth_dynamic_groups/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from . import models diff --git a/auth_dynamic_groups/__manifest__.py b/auth_dynamic_groups/__manifest__.py new file mode 100644 index 0000000000..afc73e2742 --- /dev/null +++ b/auth_dynamic_groups/__manifest__.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Copyright 2013-2019 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Dynamic groups", + "version": "10.0.1.0.0", + "author": "Odoo Community Association (OCA),Therp BV", + "license": "AGPL-3", + "complexity": "normal", + 'summary': 'Have membership conditions for certain groups', + "category": "Tools", + "website": "https://github.com/OCA/server-auth", + "depends": [ + 'base', + ], + "data": [ + 'views/res_groups.xml', + ], +} diff --git a/auth_dynamic_groups/i18n/ar.po b/auth_dynamic_groups/i18n/ar.po new file mode 100644 index 0000000000..839df565d6 --- /dev/null +++ b/auth_dynamic_groups/i18n/ar.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-12 03:50+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Arabic (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/ar/)\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "المستخدمون" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/auth_dynamic_groups.pot b/auth_dynamic_groups/i18n/auth_dynamic_groups.pot new file mode 100644 index 0000000000..555984211c --- /dev/null +++ b/auth_dynamic_groups/i18n/auth_dynamic_groups.pot @@ -0,0 +1,61 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "The condition to be met for a user to be a member of this group. It is evaluated as python code at login time, you get `user` passed as a browse record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" + diff --git a/auth_dynamic_groups/i18n/ca.po b/auth_dynamic_groups/i18n/ca.po new file mode 100644 index 0000000000..8c26b963b2 --- /dev/null +++ b/auth_dynamic_groups/i18n/ca.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-17 07:51+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Catalan (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/ca/)\n" +"Language: ca\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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Usuaris" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/da.po b/auth_dynamic_groups/i18n/da.po new file mode 100644 index 0000000000..b4b32effed --- /dev/null +++ b/auth_dynamic_groups/i18n/da.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-18 02:08+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Danish (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/da/)\n" +"Language: da\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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Brugere" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/de.po b/auth_dynamic_groups/i18n/de.po new file mode 100644 index 0000000000..52ce79762c --- /dev/null +++ b/auth_dynamic_groups/i18n/de.po @@ -0,0 +1,81 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +# Ahmet Altinisik , 2015 +# danimaribeiro , 2016 +# FIRST AUTHOR , 2012-2013 +# Gustavo Lepri , 2015 +# Hotellook, 2014 +# Matjaž Mozetič , 2016 +# Paolo Valier, 2016 +# Pedro M. Baeza , 2015 +# Rudolf Schnapka , 2015-2017 +# SaFi J. , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-07 03:47+0000\n" +"PO-Revision-Date: 2017-03-05 12:29+0000\n" +"Last-Translator: Rudolf Schnapka \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-8-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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "Berechtigungsgruppen" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "Bedingung" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "Dynamisch" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "Auswerten" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "Tragen Sie Ihre Bedingung ein..." + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "Die Bedingung wird nicht korrekt ausgewertet." + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" +"Die zu erfüllende Bedingung, dass ein Benutzer Mitglied dieser Gruppe ist. " +"Es wird bei der Anmeldung als Python-Code ausgewertet, Sie erhalten 'user' " +"passed als Browse-record" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Benutzer" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "{'readonly': [('is_dynamic', '=', True)]}" diff --git a/auth_dynamic_groups/i18n/el_GR.po b/auth_dynamic_groups/i18n/el_GR.po new file mode 100644 index 0000000000..87046c25b8 --- /dev/null +++ b/auth_dynamic_groups/i18n/el_GR.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-12 03:50+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Greek (Greece) (http://www.transifex.com/oca/OCA-server-" +"tools-8-0/language/el_GR/)\n" +"Language: el_GR\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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "Συνθήκη " + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Χρήστες" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/es.po b/auth_dynamic_groups/i18n/es.po new file mode 100644 index 0000000000..6a347b1891 --- /dev/null +++ b/auth_dynamic_groups/i18n/es.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +# Antonio Trueba, 2016 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-01-19 14:44+0000\n" +"PO-Revision-Date: 2016-02-10 16:47+0000\n" +"Last-Translator: Antonio Trueba\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-8-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" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "Condición" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "Dinámico" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "Evaluar" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Usuarios" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/es_ES.po b/auth_dynamic_groups/i18n/es_ES.po new file mode 100644 index 0000000000..507f836f71 --- /dev/null +++ b/auth_dynamic_groups/i18n/es_ES.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-12 03:50+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (Spain) (http://www.transifex.com/oca/OCA-server-" +"tools-8-0/language/es_ES/)\n" +"Language: es_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" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Usuarios" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/fi.po b/auth_dynamic_groups/i18n/fi.po new file mode 100644 index 0000000000..39599620b1 --- /dev/null +++ b/auth_dynamic_groups/i18n/fi.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-14 07:02+0000\n" +"PO-Revision-Date: 2016-04-04 11:03+0000\n" +"Last-Translator: Jarmo Kortetjärvi \n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/fi/)\n" +"Language: fi\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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Käyttäjät" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/fr.po b/auth_dynamic_groups/i18n/fr.po new file mode 100644 index 0000000000..9a880b16cd --- /dev/null +++ b/auth_dynamic_groups/i18n/fr.po @@ -0,0 +1,72 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +# Christophe kryskool , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-11-27 14:01+0000\n" +"PO-Revision-Date: 2015-11-21 08:20+0000\n" +"Last-Translator: Christophe kryskool \n" +"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-8-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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "Accès des groupes" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "Condition" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "Dynamique" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "Evaluer" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "Remplir vos conditions..." + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "La condition n'a pas été évaluer correctement!" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" +"La condition doit être mise pour l'utilisateur pour devenir membre de ce " +"groupe. Elle sera évaluée comme du code python, vous devez utiliser `user` " +"comme un browse record" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Utilisateurs" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "{'readonly': [('is_dynamic', '=', True)]}" diff --git a/auth_dynamic_groups/i18n/fr_CH.po b/auth_dynamic_groups/i18n/fr_CH.po new file mode 100644 index 0000000000..80109d6469 --- /dev/null +++ b/auth_dynamic_groups/i18n/fr_CH.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-30 14:52+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (Switzerland) (http://www.transifex.com/oca/OCA-server-" +"tools-8-0/language/fr_CH/)\n" +"Language: fr_CH\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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Utilisateurs" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/hr.po b/auth_dynamic_groups/i18n/hr.po new file mode 100644 index 0000000000..250b5d569e --- /dev/null +++ b/auth_dynamic_groups/i18n/hr.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-12 03:50+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Korisnici" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/hr_HR.po b/auth_dynamic_groups/i18n/hr_HR.po new file mode 100644 index 0000000000..b7e3c86501 --- /dev/null +++ b/auth_dynamic_groups/i18n/hr_HR.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-12 03:50+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-server-" +"tools-8-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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Korisnici" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/it.po b/auth_dynamic_groups/i18n/it.po new file mode 100644 index 0000000000..1874b29e3f --- /dev/null +++ b/auth_dynamic_groups/i18n/it.po @@ -0,0 +1,72 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +# Paolo Valier, 2016 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-17 15:36+0000\n" +"PO-Revision-Date: 2016-03-13 08:57+0000\n" +"Last-Translator: Paolo Valier\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/it/)\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" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "Gruppi di Accesso" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "Condizione" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "Dinamico" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "Valuta" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "Inserisci la condizione..." + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "Questa correzione non viene valutata correttamente!" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" +"La condizione che deve esser soddisfatta affinché un utente sia membro di " +"questo gruppo. E' valutata come codice python al momento del login, ritorna " +"l'utente passato come ricerca del valore" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Utenti" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/nl.po b/auth_dynamic_groups/i18n/nl.po new file mode 100644 index 0000000000..e017d8d0ba --- /dev/null +++ b/auth_dynamic_groups/i18n/nl.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-12 03:50+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Dutch (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/nl/)\n" +"Language: nl\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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Gebruikers" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/pt_BR.po b/auth_dynamic_groups/i18n/pt_BR.po new file mode 100644 index 0000000000..ea6bdc37d5 --- /dev/null +++ b/auth_dynamic_groups/i18n/pt_BR.po @@ -0,0 +1,72 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +# Armando Vulcano Junior , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-18 20:45+0000\n" +"Last-Translator: Armando Vulcano Junior \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-" +"tools-8-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" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "Grupos de Acesso" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "Condição" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "Dinâmico" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "Avaliar" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "Preencha na sua condição..." + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "Condição não avalia corretamente!" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" +"A condição a ser cumprida para um usuário ser um membro deste grupo. É " +"avaliado como código python no momento do login, você pega `user` passado " +"como um registro de procura" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Usuários" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "{'readonly': [('is_dynamic', '=', True)]}" diff --git a/auth_dynamic_groups/i18n/sl.po b/auth_dynamic_groups/i18n/sl.po new file mode 100644 index 0000000000..6f05b461de --- /dev/null +++ b/auth_dynamic_groups/i18n/sl.po @@ -0,0 +1,72 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-24 11:47+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-8-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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "Dostopne skupine" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "Pogoj" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "Dinamične" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "Ovrednoti" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "Izpolnite svoj pogoj..." + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "Pogoj se ne ovrednoti pravilno!" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" +"Pogoj, ki ga mora uporabnik izpolniti, da bi bil član te skupine. Ovrednoten " +"je kot python koda ob prijavi. Uporabnik je spuščen kot brskalni zapis." + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Uporabniki" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "{'readonly': [('is_dynamic', '=', True)]}" diff --git a/auth_dynamic_groups/i18n/tr.po b/auth_dynamic_groups/i18n/tr.po new file mode 100644 index 0000000000..f36fd47b8b --- /dev/null +++ b/auth_dynamic_groups/i18n/tr.po @@ -0,0 +1,100 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +# Ahmet Altinisik , 2016 +# Ahmet Altinisik , 2016 +# Antonio Trueba, 2016 +# bossnm11 , 2014 +# Carles Antoli , 2015 +# Chanseok , 2014 +# Chul Park , 2015 +# David10000 , 2014 +# FIRST AUTHOR , 2012-2013 +# Gil , 2014 +# kmooc , 2015 +# Hongseob Lee , 2015 +# jeon , 2014 +# JiyeonLee , 2014 +# Jong-Dae Park , 2013 +# Kevin Min , 2015 +# KimKyudong , 2014 +# mariana1201 , 2014 +# Matjaž Mozetič , 2015-2016 +# Nicole , 2014 +# Paolo Valier, 2016 +# Pope, 2014 +# Rudolf Schnapka , 2016 +# Sarina Canelake , 2014 +# Seok Jun Yoon , 2015 +# shin2012 , 2014 +# Sujin Lee , 2014 +# Sunah Lim , 2013 +# Young C. Kim, 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 05:31+0000\n" +"PO-Revision-Date: 2016-12-30 18:52+0000\n" +"Last-Translator: Ahmet Altinisik \n" +"Language-Team: Turkish (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/tr/)\n" +"Language: tr\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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "Erişim Grupları" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "Koşul" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "Dinamik" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "Değerlendir" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "Durumunuzu doldurun..." + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "Bu koşul doğru hesaplanamıyor!" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" +"Bu kullanıcının bu gruba üye olabilmesi için sağlaması gereken koşul. Koşul " +"bir python kodu olarak kullanıcı sisteme giriş yaparken değerlendirilir. " +"Sizs 'user' ı browe kaydı olarak alırsınız." + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Kullanıcılar" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "{'readonly': [('is_dynamic', '=', True)]}" diff --git a/auth_dynamic_groups/i18n/tr_TR.po b/auth_dynamic_groups/i18n/tr_TR.po new file mode 100644 index 0000000000..300ff3b852 --- /dev/null +++ b/auth_dynamic_groups/i18n/tr_TR.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-31 08:34+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Turkish (Turkey) (http://www.transifex.com/oca/OCA-server-" +"tools-8-0/language/tr_TR/)\n" +"Language: tr_TR\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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "Kullanıcılar" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/i18n/zh_CN.po b/auth_dynamic_groups/i18n/zh_CN.po new file mode 100644 index 0000000000..b06f6640ca --- /dev/null +++ b/auth_dynamic_groups/i18n/zh_CN.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * auth_dynamic_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-12 03:50+0000\n" +"PO-Revision-Date: 2015-09-18 13:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-server-" +"tools-8-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: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_groups +msgid "Access Groups" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,dynamic_group_condition:0 +msgid "Condition" +msgstr "" + +#. module: auth_dynamic_groups +#: field:res.groups,is_dynamic:0 +msgid "Dynamic" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Evaluate" +msgstr "" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "Fill in your condition..." +msgstr "" + +#. module: auth_dynamic_groups +#: code:addons/auth_dynamic_groups/model/res_groups.py:57 +#, python-format +msgid "The condition doesn't evaluate correctly!" +msgstr "" + +#. module: auth_dynamic_groups +#: help:res.groups,dynamic_group_condition:0 +msgid "" +"The condition to be met for a user to be a member of this group. It is " +"evaluated as python code at login time, you get `user` passed as a browse " +"record" +msgstr "" + +#. module: auth_dynamic_groups +#: model:ir.model,name:auth_dynamic_groups.model_res_users +msgid "Users" +msgstr "用户" + +#. module: auth_dynamic_groups +#: view:res.groups:auth_dynamic_groups.view_groups_form +msgid "{'readonly': [('is_dynamic', '=', True)]}" +msgstr "" diff --git a/auth_dynamic_groups/models/__init__.py b/auth_dynamic_groups/models/__init__.py new file mode 100644 index 0000000000..ee0f535b70 --- /dev/null +++ b/auth_dynamic_groups/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from . import res_users +from . import res_groups diff --git a/auth_dynamic_groups/models/res_groups.py b/auth_dynamic_groups/models/res_groups.py new file mode 100644 index 0000000000..164135acda --- /dev/null +++ b/auth_dynamic_groups/models/res_groups.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2013-2019 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import _, api, exceptions, fields, models +from odoo.tools.safe_eval import safe_eval + + +class ResGroups(models.Model): + _inherit = 'res.groups' + + is_dynamic = fields.Boolean('Dynamic') + dynamic_group_condition = fields.Text( + 'Condition', help='The condition to be met for a user to be a ' + 'member of this group. It is evaluated as python code at login ' + 'time, you get `user` passed as a browse record') + + @api.multi + def eval_dynamic_group_condition(self, uid=None): + user = self.env['res.users'].browse([uid]) if uid else self.env.user + result = all( + self.mapped( + lambda this: safe_eval( + this.dynamic_group_condition or 'False', + { + 'user': user.sudo(), + 'any': any, + 'all': all, + 'filter': filter, + }))) + return result + + @api.multi + @api.constrains('dynamic_group_condition') + def _check_dynamic_group_condition(self): + try: + self.filtered('is_dynamic').eval_dynamic_group_condition() + except (NameError, SyntaxError, TypeError): + raise exceptions.ValidationError( + _('The condition doesn\'t evaluate correctly!')) + + @api.multi + def action_evaluate(self): + res_users = self.env['res.users'] + for user in res_users.search([]): + res_users.update_dynamic_groups(user.id, self.env.cr.dbname) diff --git a/auth_dynamic_groups/models/res_users.py b/auth_dynamic_groups/models/res_users.py new file mode 100644 index 0000000000..609d98485d --- /dev/null +++ b/auth_dynamic_groups/models/res_users.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# Copyright 2013-2019 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import models, SUPERUSER_ID +from odoo.api import Environment + + +class ResUsers(models.Model): + _inherit = 'res.users' + + @classmethod + def _login(self, db, login, password): + uid = super(ResUsers, self)._login(db, login, password) + + if uid and uid != SUPERUSER_ID: + self.update_dynamic_groups(uid, db) + + return uid + + @classmethod + def update_dynamic_groups(self, uid, db): + with self.pool.cursor() as cr: + env = Environment(cr, SUPERUSER_ID, {}) + dynamic_groups = env['res.groups'].search([ + ('is_dynamic', '=', True) + ]) + if dynamic_groups: + cr.execute( + 'delete from res_groups_users_rel ' + 'where uid=%s and gid in %s', + (uid, tuple(dynamic_groups.ids)) + ) + for dynamic_group in dynamic_groups: + if dynamic_group.eval_dynamic_group_condition(uid=uid): + cr.execute( + 'insert into res_groups_users_rel (uid, gid) values ' + '(%s, %s)', + (uid, dynamic_group.id), + ) + env['res.users'].invalidate_cache(['groups_id'], [uid]) diff --git a/auth_dynamic_groups/readme/CONFIGURE.rst b/auth_dynamic_groups/readme/CONFIGURE.rst new file mode 100644 index 0000000000..9954a02ce0 --- /dev/null +++ b/auth_dynamic_groups/readme/CONFIGURE.rst @@ -0,0 +1,7 @@ +Check `Dynamic` on a group you want to be dynamic. Now fill in the condition, +using `user` which is a browse record of the user in question that evaluates +truthy if the user is supposed to be a member of the group and falsy if not. + +There is a constraint on the field to check for validity if this expression. +When you're satisfied, click the button `Evaluate` to prefill the group's +members. The condition will be checked now for every user who logs in. diff --git a/auth_dynamic_groups/readme/CONTRIBUTORS.rst b/auth_dynamic_groups/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..b120a956f8 --- /dev/null +++ b/auth_dynamic_groups/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Holger Brunn diff --git a/auth_dynamic_groups/readme/CREDITS.rst b/auth_dynamic_groups/readme/CREDITS.rst new file mode 100644 index 0000000000..cc056a80d6 --- /dev/null +++ b/auth_dynamic_groups/readme/CREDITS.rst @@ -0,0 +1 @@ +* Odoo Community Association: `Icon `_. diff --git a/auth_dynamic_groups/readme/DESCRIPTION.rst b/auth_dynamic_groups/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..150ae3646e --- /dev/null +++ b/auth_dynamic_groups/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module allows defining groups whose membership is a condition expressed as +python code. For every user, it is evaluated during login if she belongs to +the group or not. diff --git a/auth_dynamic_groups/readme/USAGE.rst b/auth_dynamic_groups/readme/USAGE.rst new file mode 100644 index 0000000000..a2dae1c29b --- /dev/null +++ b/auth_dynamic_groups/readme/USAGE.rst @@ -0,0 +1,12 @@ +We have a group called `Amsterdam` and want it to contain all users from +city of Amsterdam. So we use the membership condition + +.. code:: python + + user.partner_id.city == 'Amsterdam' + +Now we can be sure every user living in this city is in the right group, and we +can start assigning local menus to it, adjust permissions, etc. Keep in mind +that view overrides can also be restricted by a group id, this gives a lot of +possibilities to dynamically adapt views based on arbitrary properties +reachable via the user record. diff --git a/auth_api_key/static/description/icon.png b/auth_dynamic_groups/static/description/icon.png similarity index 100% rename from auth_api_key/static/description/icon.png rename to auth_dynamic_groups/static/description/icon.png diff --git a/auth_api_key/static/description/index.html b/auth_dynamic_groups/static/description/index.html similarity index 73% rename from auth_api_key/static/description/index.html rename to auth_dynamic_groups/static/description/index.html index 258baea177..ac5d363ccd 100644 --- a/auth_api_key/static/description/index.html +++ b/auth_dynamic_groups/static/description/index.html @@ -4,7 +4,7 @@ -Auth Api Key +Dynamic groups -
-

Auth Api Key

+
+

Dynamic groups

-

Beta License: LGPL-3 OCA/server-auth Translate me on Weblate Try me on Runbot

-

Authenticate http requests from an API key.

-

API keys are codes passed in (in the http header API-KEY) by programs calling an API in order to identify -in this case- the calling program’s user.

-

Take care while using this kind of mechanism since information into http headers are visible in clear. Thus, use it only to authenticate requests from known sources. For unknown sources, it is a good practice to filter out this header at proxy level.

+

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

+

This module allows defining groups whose membership is a condition expressed as +python code. For every user, it is evaluated during login if she belongs to +the group or not.

Table of contents

Configuration

-

The api key must be provided by the configuration parameter named -‘api_key_*.key’, and the user under the same option ‘api_key_*.user’.

-

For instance :

-
-[api_key_mykey]
-key=my_api_key
-user=my_user
-
+

Check Dynamic on a group you want to be dynamic. Now fill in the condition, +using user which is a browse record of the user in question that evaluates +truthy if the user is supposed to be a member of the group and falsy if not.

+

There is a constraint on the field to check for validity if this expression. +When you’re satisfied, click the button Evaluate to prefill the group’s +members. The condition will be checked now for every user who logs in.

Usage

-

To apply this authentication system to your http request you must set ‘api_key’ -as value for the ‘auth’ parameter of your route definition into your controller.

+

We have a group called Amsterdam and want it to contain all users from +city of Amsterdam. So we use the membership condition

-class MyController(Controller):
-
-    @route('/my_service', auth='api_key', ...)
-    def my_service(self, *args, **kwargs):
-        pass
+user.partner_id.city == 'Amsterdam'
 
+

Now we can be sure every user living in this city is in the right group, and we +can start assigning local menus to it, adjust permissions, etc. Keep in mind +that view overrides can also be restricted by a group id, this gives a lot of +possibilities to dynamically adapt views based on arbitrary properties +reachable via the user record.

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 smashing it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -421,26 +421,29 @@

Credits

Authors

    -
  • ACSONE SA/NV
  • +
  • Therp BV

Contributors

+
+
+

Other credits

+
    +
  • Odoo Community Association: Icon.
-

Maintainers

+

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.

-

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

+

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/auth_dynamic_groups/tests/__init__.py b/auth_dynamic_groups/tests/__init__.py new file mode 100644 index 0000000000..aad8e4dc85 --- /dev/null +++ b/auth_dynamic_groups/tests/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from . import test_auth_dynamic_groups diff --git a/auth_dynamic_groups/tests/test_auth_dynamic_groups.py b/auth_dynamic_groups/tests/test_auth_dynamic_groups.py new file mode 100644 index 0000000000..861c45d8a7 --- /dev/null +++ b/auth_dynamic_groups/tests/test_auth_dynamic_groups.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Copyright 2019 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo.tests.common import TransactionCase + + +class TestAuthDynamicGroups(TransactionCase): + def test_auth_dynamic_groups(self): + # without this, the below happens in another transaction we don't see + self.env.registry.enter_test_mode() + env = self.env(cr=self.env.registry.cursor()) + demo_user = env.ref('base.user_demo') + group = env['res.groups'].create({ + 'name': 'dynamic group', + 'is_dynamic': True, + 'dynamic_group_condition': "'Demo' in user.name", + }) + group.action_evaluate() + group.refresh() + self.assertIn(demo_user, group.users) + group.write({'users': [(6, False, [])]}) + self.assertFalse(group.users) + self.env['res.users']._login(self.env.cr.dbname, 'demo', 'demo') + group.refresh() + self.assertIn(demo_user, group.users) + self.env.registry.leave_test_mode() diff --git a/auth_dynamic_groups/views/res_groups.xml b/auth_dynamic_groups/views/res_groups.xml new file mode 100644 index 0000000000..215525d36e --- /dev/null +++ b/auth_dynamic_groups/views/res_groups.xml @@ -0,0 +1,27 @@ + + + + res.groups + + + + + + {'readonly': [('is_dynamic', '=', True)]} + + + + +