Browse Source

[IMP] Module 'auditlog' - Removed the 'timestamp' field from the 'auditlog.log' model (standard 'create_date' field is used instead)

pull/1556/head
sebalix 10 years ago
parent
commit
4752e17a63
  1. 6
      auditlog/i18n/auditlog.pot
  2. 6
      auditlog/i18n/fr.po
  3. 4
      auditlog/models/log.py
  4. 8
      auditlog/views/auditlog_view.xml

6
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"

6
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

4
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")

8
auditlog/views/auditlog_view.xml

@ -107,7 +107,7 @@
<sheet>
<group string="Log">
<group colspan="1">
<field name="timestamp" required="1" readonly="1"/>
<field name="create_date" readonly="1"/>
<field name="user_id" readonly="1"/>
<field name="method" readonly="1"/>
</group>
@ -150,7 +150,7 @@
<field name="model">auditlog.log</field>
<field name="arch" type="xml">
<tree string="Logs" create="false">
<field name="timestamp"/>
<field name="create_date"/>
<field name="name"/>
<field name="model_id"/>
<field name="res_id"/>
@ -179,9 +179,9 @@
<filter name="group_by_res_id"
string="Resource ID"
domain="[]" context="{'group_by':'res_id'}"/>
<filter name="group_by_timestamp"
<filter name="group_by_create_date"
string="Date"
domain="[]" context="{'group_by':'timestamp'}"/>
domain="[]" context="{'group_by':'create_date'}"/>
</group>
</search>
</field>

Loading…
Cancel
Save