diff --git a/auth_admin_passkey/__openerp__.py b/auth_admin_passkey/__openerp__.py index c57189b1e69..c794027fdd9 100644 --- a/auth_admin_passkey/__openerp__.py +++ b/auth_admin_passkey/__openerp__.py @@ -4,7 +4,7 @@ # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { - 'name': 'Authentification - Admin Passkey', + 'name': 'Authentication - Admin Passkey', 'version': '8.0.2.1.1', 'category': 'base', 'author': "GRAP,Odoo Community Association (OCA)", @@ -17,12 +17,6 @@ 'data/ir_config_parameter.xml', 'view/res_config_view.xml', ], - 'demo': [], - 'js': [], - 'css': [], - 'qweb': [], - 'images': [], - 'post_load': '', 'application': False, 'installable': True, 'auto_install': False, diff --git a/auth_admin_passkey/model/res_users.py b/auth_admin_passkey/model/res_users.py index bf722abfa3a..6e837fde027 100644 --- a/auth_admin_passkey/model/res_users.py +++ b/auth_admin_passkey/model/res_users.py @@ -3,12 +3,10 @@ # @author Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html -import datetime - from openerp import SUPERUSER_ID from openerp import registry from openerp import exceptions -from openerp import models, api +from openerp import api, fields, models from openerp.tools.translate import _ from openerp.tools.safe_eval import safe_eval @@ -50,7 +48,7 @@ def _send_email_passkey(self, user_agent_env): """\n\nTechnicals informations belows : \n\n""" """- Login date : %s\n\n""")) % ( login_user.login, - datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) + fields.Datetime.now()) for k, v in user_agent_env.iteritems(): body += ("- %s : %s\n\n") % (k, v) mail_obj.sudo().create({ diff --git a/setup/auth_admin_passkey/odoo_addons/__init__.py b/setup/auth_admin_passkey/odoo_addons/__init__.py new file mode 100644 index 00000000000..de40ea7ca05 --- /dev/null +++ b/setup/auth_admin_passkey/odoo_addons/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/setup/auth_admin_passkey/odoo_addons/auth_admin_passkey b/setup/auth_admin_passkey/odoo_addons/auth_admin_passkey new file mode 120000 index 00000000000..d5eef5e58bc --- /dev/null +++ b/setup/auth_admin_passkey/odoo_addons/auth_admin_passkey @@ -0,0 +1 @@ +../../../auth_admin_passkey \ No newline at end of file diff --git a/setup/auth_admin_passkey/setup.py b/setup/auth_admin_passkey/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/auth_admin_passkey/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)