Skip to content

Commit 4ea9b7a

Browse files
author
Jonathan Nemry (ACSONE)
committed
[CHG] review of OCA#522 & add setup for auth_admin
1 parent a45f5e4 commit 4ea9b7a

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

auth_admin_passkey/__openerp__.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
55

66
{
7-
'name': 'Authentification - Admin Passkey',
7+
'name': 'Authentication - Admin Passkey',
88
'version': '8.0.2.1.1',
99
'category': 'base',
1010
'author': "GRAP,Odoo Community Association (OCA)",
@@ -17,12 +17,6 @@
1717
'data/ir_config_parameter.xml',
1818
'view/res_config_view.xml',
1919
],
20-
'demo': [],
21-
'js': [],
22-
'css': [],
23-
'qweb': [],
24-
'images': [],
25-
'post_load': '',
2620
'application': False,
2721
'installable': True,
2822
'auto_install': False,

auth_admin_passkey/model/res_users.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
44
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
55

6-
import datetime
7-
86
from openerp import SUPERUSER_ID
97
from openerp import registry
108
from openerp import exceptions
11-
from openerp import models, api
9+
from openerp import api, fields, models
1210
from openerp.tools.translate import _
1311
from openerp.tools.safe_eval import safe_eval
1412

@@ -50,7 +48,7 @@ def _send_email_passkey(self, user_agent_env):
5048
"""\n\nTechnicals informations belows : \n\n"""
5149
"""- Login date : %s\n\n""")) % (
5250
login_user.login,
53-
datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
51+
fields.Datetime.now())
5452
for k, v in user_agent_env.iteritems():
5553
body += ("- %s : %s\n\n") % (k, v)
5654
mail_obj.sudo().create({
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__import__('pkg_resources').declare_namespace(__name__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../auth_admin_passkey

setup/auth_admin_passkey/setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)

0 commit comments

Comments
 (0)