From 223a677e8339688d6f5e7fe1782f6c0f99485bb9 Mon Sep 17 00:00:00 2001 From: Dave Lasley Date: Mon, 4 Dec 2017 11:23:42 -0800 Subject: [PATCH] [FIX] password_security: Default last write date * Add a default `password_write_date` to circumvent need for immediate password reset, fixing #1083 --- password_security/__openerp__.py | 2 +- password_security/models/res_users.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/password_security/__openerp__.py b/password_security/__openerp__.py index 7992f205b..cda1a83eb 100644 --- a/password_security/__openerp__.py +++ b/password_security/__openerp__.py @@ -5,7 +5,7 @@ 'name': 'Password Security', "summary": "Allow admin to set password security requirements.", - 'version': '8.0.1.1.1', + 'version': '8.0.1.1.2', 'author': "LasLabs, Odoo Community Association (OCA)", 'category': 'Base', 'depends': [ diff --git a/password_security/models/res_users.py b/password_security/models/res_users.py index 1b319ea44..b5a001b0c 100644 --- a/password_security/models/res_users.py +++ b/password_security/models/res_users.py @@ -21,6 +21,7 @@ class ResUsers(models.Model): password_write_date = fields.Datetime( 'Last password update', + default=fields.Datetime.now, readonly=True, ) password_history_ids = fields.One2many(