From 74d5872c09b98cf1cbef01cd107fbf1a6b25e8be Mon Sep 17 00:00:00 2001 From: Matthieu Dietrich Date: Fri, 27 Mar 2015 13:57:15 +0100 Subject: [PATCH] Add security file to __openerp__ + nodrop on login_date --- base_login_date_improvement/__openerp__.py | 3 ++- base_login_date_improvement/res_users.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/base_login_date_improvement/__openerp__.py b/base_login_date_improvement/__openerp__.py index d9b637750..860264bd0 100644 --- a/base_login_date_improvement/__openerp__.py +++ b/base_login_date_improvement/__openerp__.py @@ -32,7 +32,8 @@ This creates a new table and a function field to avoid this. """, "website": "http://camptocamp.com", "depends": ['base'], - "data": [], + "data": ['security/ir.model.access.csv', + ], "auto_install": False, "installable": True } diff --git a/base_login_date_improvement/res_users.py b/base_login_date_improvement/res_users.py index 08117fada..393017270 100644 --- a/base_login_date_improvement/res_users.py +++ b/base_login_date_improvement/res_users.py @@ -61,7 +61,8 @@ class ResUsers(orm.Model): 'login_date': fields.function(_get_login_date, string='Latest connection', type='date', select=1, - readonly=True, store=False), + readonly=True, store=False, + nodrop=True), } # Re-defining the login function in order to use the new table