From 42521d2abb14de09f345bee6314a930954012b4c Mon Sep 17 00:00:00 2001 From: sebalix Date: Wed, 28 Jan 2015 14:27:03 +0100 Subject: [PATCH] [IMP] Module 'auditlog' - Removed the 'timestamp' field from the 'auditlog.log' model (standard 'create_date' field is used instead) --- auditlog/i18n/auditlog.pot | 6 ------ auditlog/i18n/fr.po | 6 ------ auditlog/models/log.py | 4 +--- auditlog/views/auditlog_view.xml | 8 ++++---- 4 files changed, 5 insertions(+), 19 deletions(-) diff --git a/auditlog/i18n/auditlog.pot b/auditlog/i18n/auditlog.pot index 3118ff165..7efad6304 100644 --- a/auditlog/i18n/auditlog.pot +++ b/auditlog/i18n/auditlog.pot @@ -54,12 +54,6 @@ msgstr "" msgid "Created on" msgstr "" -#. module: auditlog -#: view:auditlog.log:auditlog.view_auditlog_log_search -#: field:auditlog.log,timestamp:0 -msgid "Date" -msgstr "" - #. module: auditlog #: field:auditlog.log.line,field_description:0 msgid "Description" diff --git a/auditlog/i18n/fr.po b/auditlog/i18n/fr.po index 7a32d696c..25f23f556 100644 --- a/auditlog/i18n/fr.po +++ b/auditlog/i18n/fr.po @@ -52,12 +52,6 @@ msgstr "" #: field:auditlog.log.line,create_date:0 #: field:auditlog.rule,create_date:0 msgid "Created on" -msgstr "" - -#. module: auditlog -#: view:auditlog.log:auditlog.view_auditlog_log_search -#: field:auditlog.log,timestamp:0 -msgid "Date" msgstr "Date" #. module: auditlog diff --git a/auditlog/models/log.py b/auditlog/models/log.py index 1706ab2a9..fff5e93d4 100644 --- a/auditlog/models/log.py +++ b/auditlog/models/log.py @@ -27,7 +27,7 @@ from openerp import models, fields class auditlog_log(models.Model): _name = 'auditlog.log' _description = "Auditlog - Log" - _order = "timestamp desc" + _order = "create_date desc" name = fields.Char("Resource Name", size=64) model_id = fields.Many2one( @@ -36,8 +36,6 @@ class auditlog_log(models.Model): user_id = fields.Many2one( 'res.users', string=u"User") method = fields.Char(u"Method", size=64) - timestamp = fields.Datetime( - u"Date", default=lambda *a: time.strftime('%Y-%m-%d %H:%M:%S')) line_ids = fields.One2many( 'auditlog.log.line', 'log_id', string=u"Fields updated") diff --git a/auditlog/views/auditlog_view.xml b/auditlog/views/auditlog_view.xml index b0a9bd5ad..e44c6cce9 100644 --- a/auditlog/views/auditlog_view.xml +++ b/auditlog/views/auditlog_view.xml @@ -107,7 +107,7 @@ - + @@ -150,7 +150,7 @@ auditlog.log - + @@ -179,9 +179,9 @@ - + domain="[]" context="{'group_by':'create_date'}"/>