Skip to content

Commit

Permalink
[CHG] review of OCA#522 & add setup for auth_admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Nemry (ACSONE) committed Feb 23, 2017
1 parent a45f5e4 commit 4ea9b7a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 1 addition & 7 deletions auth_admin_passkey/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand All @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions auth_admin_passkey/model/res_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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({
Expand Down
1 change: 1 addition & 0 deletions setup/auth_admin_passkey/odoo_addons/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
1 change: 1 addition & 0 deletions setup/auth_admin_passkey/odoo_addons/auth_admin_passkey
6 changes: 6 additions & 0 deletions setup/auth_admin_passkey/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 4ea9b7a

Please sign in to comment.