Browse Source

commit inicial

Rodney Elpidio Enciso Arias 7 years ago
commit
97d949f601
31 changed files with 665 additions and 0 deletions
  1. 46 0
      README.rst
  2. 2 0
      __init__.py
  3. BIN
      __init__.pyc
  4. 44 0
      __openerp__.py
  5. 17 0
      data/ir_config_parameter_data.xml
  6. 23 0
      i18n/ar.po
  7. 23 0
      i18n/ca.po
  8. 23 0
      i18n/da.po
  9. 23 0
      i18n/de.po
  10. 23 0
      i18n/el_GR.po
  11. 23 0
      i18n/es.po
  12. 23 0
      i18n/es_ES.po
  13. 23 0
      i18n/fi.po
  14. 23 0
      i18n/fr.po
  15. 23 0
      i18n/fr_CH.po
  16. 23 0
      i18n/hr.po
  17. 23 0
      i18n/hr_HR.po
  18. 23 0
      i18n/it.po
  19. 23 0
      i18n/nl.po
  20. 23 0
      i18n/pt_BR.po
  21. 23 0
      i18n/sl.po
  22. 23 0
      i18n/tr.po
  23. 23 0
      i18n/tr_TR.po
  24. 23 0
      i18n/zh_CN.po
  25. 3 0
      models/__init__.py
  26. BIN
      models/__init__.pyc
  27. 54 0
      models/ir_config_parameter.py
  28. BIN
      models/ir_config_parameter.pyc
  29. 62 0
      models/res_users.py
  30. BIN
      models/res_users.pyc
  31. BIN
      static/description/icon.png

+ 46 - 0
README.rst

@@ -0,0 +1,46 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+    :alt: License: AGPL-3
+
+Inactive Sessions Timeout
+=========================
+
+This module was written to be able to kill(logout) all inactive sessions since
+a given delay. On each request the server checks if the session is yet valid
+regarding the expiration delay. If not a clean logout is operated.
+
+Configuration
+=============
+
+Two system parameters are available:
+
+* inactive_session_time_out_delay: validity of a session in seconds (default = 2 Hours)
+* inactive_session_time_out_ignored_url: technical urls where the check does not occur 
+
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/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
+`here <https://github.com/OCA/server-tools/issues/new?body=module:%20inactive_session_timeout%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
+
+Credits
+=======
+
+Contributors
+------------
+
+* Cédric Pigeon <cedric.pigeon@acsone.eu>
+
+Maintainer
+----------
+
+.. image:: http://odoo-community.org/logo.png
+   :alt: Odoo Community Association
+   :target: http://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.

+ 2 - 0
__init__.py

@@ -0,0 +1,2 @@
+# -*- coding: utf-8 -*-
+from . import models

BIN
__init__.pyc


+ 44 - 0
__openerp__.py

@@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+
+#     This file is part of inactive_session_timeout, an Odoo module.
+#
+#     Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
+#
+#     inactive_session_timeout is free software: you can redistribute it
+#     and/or modify it under the terms of the GNU Affero General Public License
+#     as published by the Free Software Foundation, either version 3 of
+#     the License, or (at your option) any later version.
+#
+#     inactive_session_timeout is distributed in the hope that it will
+#     be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#     GNU Affero General Public License for more details.
+#
+#     You should have received a copy of the
+#     GNU Affero General Public License
+#     along with inactive_session_timeout.
+#     If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+    'name': "Inactive Sessions Timeout",
+
+    'summary': """
+        This module disable all inactive sessions since a given delay""",
+
+    'author': "ACSONE SA/NV, Odoo Community Association (OCA)",
+    'website': "http://acsone.eu",
+
+    'category': 'Tools',
+    'version': '8.0.1.0.0',
+    'license': 'AGPL-3',
+
+    'depends': [
+        'base',
+    ],
+
+    'data': [
+        'data/ir_config_parameter_data.xml'
+    ]
+}

+ 17 - 0
data/ir_config_parameter_data.xml

@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+<openerp>
+
+    <data noupdate="1">
+        <record id="inactive_session_time_out_delay" model="ir.config_parameter">
+            <field name="key">inactive_session_time_out_delay</field>
+            <field name="value">7200</field>
+        </record>
+    </data>
+    
+    <data noupdate="1">
+        <record id="inactive_session_time_out_ignored_url" model="ir.config_parameter">
+            <field name="key">inactive_session_time_out_ignored_url</field>
+            <field name="value">/calendar/notify,/longpolling/poll</field>
+        </record>
+    </data>
+</openerp>

+ 23 - 0
i18n/ar.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-12 03:51+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Arabic (http://www.transifex.com/oca/OCA-server-tools-8-0/language/ar/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: ar\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: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "المستخدمون"

+ 23 - 0
i18n/ca.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-17 07:52+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Catalan (http://www.transifex.com/oca/OCA-server-tools-8-0/language/ca/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: ca\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Usuaris"

+ 23 - 0
i18n/da.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-03-18 02:09+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Danish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/da/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: da\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Brugere"

+ 23 - 0
i18n/de.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+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 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-8-0/language/de/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: de\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Benutzer"

+ 23 - 0
i18n/el_GR.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-12 03:51+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Greek (Greece) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/el_GR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: el_GR\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Χρήστες"

+ 23 - 0
i18n/es.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+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 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/es/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: es\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Usuarios"

+ 23 - 0
i18n/es_ES.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-12 03:51+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Spanish (Spain) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/es_ES/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: es_ES\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Usuarios"

+ 23 - 0
i18n/fi.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# 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:02+0000\n"
+"Last-Translator: Jarmo Kortetjärvi <jarmo.kortetjarvi@gmail.com>\n"
+"Language-Team: Finnish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/fi/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fi\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Käyttäjät"

+ 23 - 0
i18n/fr.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+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 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-8-0/language/fr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Utilisateurs"

+ 23 - 0
i18n/fr_CH.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-11-30 14:53+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: French (Switzerland) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/fr_CH/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: fr_CH\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Utilisateurs"

+ 23 - 0
i18n/hr.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-12 03:51+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Croatian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/hr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: hr\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Korisnici"

+ 23 - 0
i18n/hr_HR.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-12 03:51+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Croatian (Croatia) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/hr_HR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: hr_HR\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Korisnici"

+ 23 - 0
i18n/it.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-03-17 15:37+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Italian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/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: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Utenti"

+ 23 - 0
i18n/nl.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-12 03:51+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Dutch (http://www.transifex.com/oca/OCA-server-tools-8-0/language/nl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: nl\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Gebruikers"

+ 23 - 0
i18n/pt_BR.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+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 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Usuários"

+ 23 - 0
i18n/sl.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+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č <m.mozetic@matmoz.si>\n"
+"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/sl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: sl\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Uporabniki"

+ 23 - 0
i18n/tr.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+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-01-31 12:50+0000\n"
+"Last-Translator: Ahmet Altınışık <aaltinisik@altinkaya.com.tr>\n"
+"Language-Team: Turkish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/tr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: tr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Kullanıcılar"

+ 23 - 0
i18n/tr_TR.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-12-31 08:35+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Turkish (Turkey) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/tr_TR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: tr_TR\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "Kullanıcılar"

+ 23 - 0
i18n/zh_CN.po

@@ -0,0 +1,23 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * inactive_session_timeout
+# 
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: server-tools (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-12 03:51+0000\n"
+"PO-Revision-Date: 2015-09-18 13:55+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/zh_CN/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: zh_CN\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. module: inactive_session_timeout
+#: model:ir.model,name:inactive_session_timeout.model_res_users
+msgid "Users"
+msgstr "用户"

+ 3 - 0
models/__init__.py

@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+from . import res_users
+from . import ir_config_parameter

BIN
models/__init__.pyc


+ 54 - 0
models/ir_config_parameter.py

@@ -0,0 +1,54 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+
+#     This file is part of inactive_session_timeout, an Odoo module.
+#
+#     Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
+#
+#     inactive_session_timeout is free software: you can redistribute it
+#     and/or modify it under the terms of the GNU Affero General Public License
+#     as published by the Free Software Foundation, either version 3 of
+#     the License, or (at your option) any later version.
+#
+#     inactive_session_timeout is distributed in the hope that it will
+#     be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#     GNU Affero General Public License for more details.
+#
+#     You should have received a copy of the
+#     GNU Affero General Public License
+#     along with inactive_session_timeout.
+#     If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from openerp import models, api, tools, SUPERUSER_ID
+
+
+DELAY_KEY = 'inactive_session_time_out_delay'
+IGNORED_PATH_KEY = 'inactive_session_time_out_ignored_url'
+
+
+class IrConfigParameter(models.Model):
+    _inherit = 'ir.config_parameter'
+
+    @tools.ormcache(skiparg=0)
+    def get_session_parameters(self, db):
+        param_model = self.pool['ir.config_parameter']
+        cr = self.pool.cursor()
+        delay = False
+        urls = []
+        try:
+            delay = int(param_model.get_param(
+                cr, SUPERUSER_ID, DELAY_KEY, 7200))
+            urls = param_model.get_param(
+                cr, SUPERUSER_ID, IGNORED_PATH_KEY, '').split(',')
+        finally:
+            cr.close()
+        return delay, urls
+
+    @api.multi
+    def write(self, vals, context=None):
+        res = super(IrConfigParameter, self).write(vals)
+        if self.key in [DELAY_KEY, IGNORED_PATH_KEY]:
+            self.get_session_parameters.clear_cache(self)
+        return res

BIN
models/ir_config_parameter.pyc


+ 62 - 0
models/res_users.py

@@ -0,0 +1,62 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+
+#     This file is part of inactive_session_timeout, an Odoo module.
+#
+#     Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
+#
+#     inactive_session_timeout is free software: you can redistribute it
+#     and/or modify it under the terms of the GNU Affero General Public License
+#     as published by the Free Software Foundation, either version 3 of
+#     the License, or (at your option) any later version.
+#
+#     inactive_session_timeout is distributed in the hope that it will
+#     be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#     GNU Affero General Public License for more details.
+#
+#     You should have received a copy of the
+#     GNU Affero General Public License
+#     along with inactive_session_timeout.
+#     If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from openerp import models
+from openerp import http
+
+from openerp.http import root
+from openerp.http import request
+
+from os import utime
+from os.path import getmtime
+from time import time
+
+
+class ResUsers(models.Model):
+    _inherit = 'res.users'
+
+    def _check_session_validity(self, db, uid, passwd):
+        if not request:
+            return
+        session = request.session
+        session_store = root.session_store
+        param_obj = self.pool['ir.config_parameter']
+        delay, urls = param_obj.get_session_parameters(db)
+        deadline = time() - delay
+        path = session_store.get_session_filename(session.sid)
+        try:
+            if getmtime(path) < deadline:
+                if session.db and session.uid:
+                    session.logout(keep_db=True)
+            elif http.request.httprequest.path not in urls:
+                # the session is not expired, update the last modification
+                # and access time.
+                utime(path, None)
+        except OSError:
+            pass
+        return
+
+    def check(self, db, uid, passwd):
+        res = super(ResUsers, self).check(db, uid, passwd)
+        self._check_session_validity(db, uid, passwd)
+        return res

BIN
models/res_users.pyc


BIN
static/description/icon.png