[MIG] auditlog: Migration to 13.0

pull/2466/head
Eric Lembregts 2019-10-01 09:59:18 +02:00 committed by Stefan Rijnhart
parent 83b470a79b
commit 1b1f827c1b
11 changed files with 25 additions and 44 deletions

View File

@ -14,13 +14,13 @@ Audit Log
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/12.0/auditlog :target: https://github.com/OCA/server-tools/tree/13.0/auditlog
:alt: OCA/server-tools :alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-auditlog :target: https://translation.odoo-community.org/projects/server-tools-13-0/server-tools-13-0-auditlog
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/149/12.0 :target: https://runbot.odoo-community.org/runbot/149/13.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@ -70,7 +70,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues. Do not contact contributors directly about support or help with technical issues.
@ -88,6 +88,7 @@ Contributors
* Sebastien Alix <sebastien.alix@camptocamp.com> * Sebastien Alix <sebastien.alix@camptocamp.com>
* Holger Brunn <hbrunn@therp.nl> * Holger Brunn <hbrunn@therp.nl>
* Holden Rehg <holdenrehg@gmail.com> * Holden Rehg <holdenrehg@gmail.com>
* Eric Lembregts <eric@lembregts.eu>
Other credits Other credits
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
@ -107,6 +108,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/12.0/auditlog>`_ project on GitHub. This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/13.0/auditlog>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -3,7 +3,7 @@
{ {
'name': "Audit Log", 'name': "Audit Log",
'version': "12.0.1.0.0", 'version': "13.0.1.0.0",
'author': "ABF OSIELL,Odoo Community Association (OCA)", 'author': "ABF OSIELL,Odoo Community Association (OCA)",
'license': "AGPL-3", 'license': "AGPL-3",
'website': "https://github.com/OCA/server-tools/", 'website': "https://github.com/OCA/server-tools/",

View File

@ -34,7 +34,6 @@ class AuditlogHTTPRequest(models.Model):
httprequest.name or '?', httprequest.name or '?',
fields.Datetime.to_string(tz_create_date)) fields.Datetime.to_string(tz_create_date))
@api.multi
def name_get(self): def name_get(self):
return [(request.id, request.display_name) for request in self] return [(request.id, request.display_name) for request in self]

View File

@ -28,7 +28,6 @@ class AuditlogtHTTPSession(models.Model):
httpsession.user_id and httpsession.user_id.name or '?', httpsession.user_id and httpsession.user_id.name or '?',
fields.Datetime.to_string(tz_create_date)) fields.Datetime.to_string(tz_create_date))
@api.multi
def name_get(self): def name_get(self):
return [(session.id, session.display_name) for session in self] return [(session.id, session.display_name) for session in self]

View File

@ -14,7 +14,7 @@ class AuditlogLog(models.Model):
res_id = fields.Integer("Resource ID") res_id = fields.Integer("Resource ID")
user_id = fields.Many2one( user_id = fields.Many2one(
'res.users', string="User") 'res.users', string="User")
method = fields.Char("Method", size=64) method = fields.Char(size=64)
line_ids = fields.One2many( line_ids = fields.One2many(
'auditlog.log.line', 'log_id', string="Fields updated") 'auditlog.log.line', 'log_id', string="Fields updated")
http_session_id = fields.Many2one( http_session_id = fields.Many2one(
@ -36,8 +36,8 @@ class AuditlogLogLine(models.Model):
'ir.model.fields', ondelete='cascade', string="Field", required=True) 'ir.model.fields', ondelete='cascade', string="Field", required=True)
log_id = fields.Many2one( log_id = fields.Many2one(
'auditlog.log', string="Log", ondelete='cascade', index=True) 'auditlog.log', string="Log", ondelete='cascade', index=True)
old_value = fields.Text("Old Value") old_value = fields.Text()
new_value = fields.Text("New Value") new_value = fields.Text()
old_value_text = fields.Text("Old value Text") old_value_text = fields.Text("Old value Text")
new_value_text = fields.Text("New value Text") new_value_text = fields.Text("New value Text")
field_name = fields.Char("Technical name", related='field_id.name') field_name = fields.Char("Technical name", related='field_id.name')

View File

@ -45,8 +45,7 @@ class AuditlogRule(models.Model):
_description = "Auditlog - Rule" _description = "Auditlog - Rule"
name = fields.Char( name = fields.Char(
"Name", required=True, required=True, states={'subscribed': [('readonly', True)]})
states={'subscribed': [('readonly', True)]})
model_id = fields.Many2one( model_id = fields.Many2one(
'ir.model', "Model", required=True, 'ir.model', "Model", required=True,
help="Select model for which you want to generate log.", help="Select model for which you want to generate log.",
@ -99,7 +98,7 @@ class AuditlogRule(models.Model):
# "record of the model of this rule")) # "record of the model of this rule"))
state = fields.Selection( state = fields.Selection(
[('draft', "Draft"), ('subscribed', "Subscribed")], [('draft', "Draft"), ('subscribed', "Subscribed")],
string="State", required=True, default='draft') required=True, default='draft')
action_id = fields.Many2one( action_id = fields.Many2one(
'ir.actions.act_window', string="Action", 'ir.actions.act_window', string="Action",
states={'subscribed': [('readonly', True)]}) states={'subscribed': [('readonly', True)]})
@ -121,7 +120,6 @@ class AuditlogRule(models.Model):
self = self.search([('state', '=', 'subscribed')]) self = self.search([('state', '=', 'subscribed')])
return self._patch_methods() return self._patch_methods()
@api.multi
def _patch_methods(self): def _patch_methods(self):
"""Patch ORM methods of models defined in rules to log their calls.""" """Patch ORM methods of models defined in rules to log their calls."""
updated = False updated = False
@ -165,7 +163,6 @@ class AuditlogRule(models.Model):
updated = True updated = True
return updated return updated
@api.multi
def _revert_methods(self): def _revert_methods(self):
"""Restore original ORM methods of models defined in rules.""" """Restore original ORM methods of models defined in rules."""
updated = False updated = False
@ -188,7 +185,6 @@ class AuditlogRule(models.Model):
modules.registry.Registry(self.env.cr.dbname).signal_changes() modules.registry.Registry(self.env.cr.dbname).signal_changes()
return new_record return new_record
@api.multi
def write(self, vals): def write(self, vals):
"""Update the registry when existing rules are updated.""" """Update the registry when existing rules are updated."""
super(AuditlogRule, self).write(vals) super(AuditlogRule, self).write(vals)
@ -196,13 +192,11 @@ class AuditlogRule(models.Model):
modules.registry.Registry(self.env.cr.dbname).signal_changes() modules.registry.Registry(self.env.cr.dbname).signal_changes()
return True return True
@api.multi
def unlink(self): def unlink(self):
"""Unsubscribe rules before removing them.""" """Unsubscribe rules before removing them."""
self.unsubscribe() self.unsubscribe()
return super(AuditlogRule, self).unlink() return super(AuditlogRule, self).unlink()
@api.multi
def _make_create(self): def _make_create(self):
"""Instanciate a create method that log its calls.""" """Instanciate a create method that log its calls."""
self.ensure_one() self.ensure_one()
@ -237,7 +231,6 @@ class AuditlogRule(models.Model):
return create_full if self.log_type == 'full' else create_fast return create_full if self.log_type == 'full' else create_fast
@api.multi
def _make_read(self): def _make_read(self):
"""Instanciate a read method that log its calls.""" """Instanciate a read method that log its calls."""
self.ensure_one() self.ensure_one()
@ -267,13 +260,11 @@ class AuditlogRule(models.Model):
return result return result
return read return read
@api.multi
def _make_write(self): def _make_write(self):
"""Instanciate a write method that log its calls.""" """Instanciate a write method that log its calls."""
self.ensure_one() self.ensure_one()
log_type = self.log_type log_type = self.log_type
@api.multi
def write_full(self, vals, **kwargs): def write_full(self, vals, **kwargs):
self = self.with_context(auditlog_disabled=True) self = self.with_context(auditlog_disabled=True)
rule_model = self.env['auditlog.rule'] rule_model = self.env['auditlog.rule']
@ -289,7 +280,6 @@ class AuditlogRule(models.Model):
'write', old_values, new_values, {'log_type': log_type}) 'write', old_values, new_values, {'log_type': log_type})
return result return result
@api.multi
def write_fast(self, vals, **kwargs): def write_fast(self, vals, **kwargs):
self = self.with_context(auditlog_disabled=True) self = self.with_context(auditlog_disabled=True)
rule_model = self.env['auditlog.rule'] rule_model = self.env['auditlog.rule']
@ -308,13 +298,11 @@ class AuditlogRule(models.Model):
return write_full if self.log_type == 'full' else write_fast return write_full if self.log_type == 'full' else write_fast
@api.multi
def _make_unlink(self): def _make_unlink(self):
"""Instanciate an unlink method that log its calls.""" """Instanciate an unlink method that log its calls."""
self.ensure_one() self.ensure_one()
log_type = self.log_type log_type = self.log_type
@api.multi
def unlink_full(self, **kwargs): def unlink_full(self, **kwargs):
self = self.with_context(auditlog_disabled=True) self = self.with_context(auditlog_disabled=True)
rule_model = self.env['auditlog.rule'] rule_model = self.env['auditlog.rule']
@ -326,7 +314,6 @@ class AuditlogRule(models.Model):
{'log_type': log_type}) {'log_type': log_type})
return unlink_full.origin(self, **kwargs) return unlink_full.origin(self, **kwargs)
@api.multi
def unlink_fast(self, **kwargs): def unlink_fast(self, **kwargs):
self = self.with_context(auditlog_disabled=True) self = self.with_context(auditlog_disabled=True)
rule_model = self.env['auditlog.rule'] rule_model = self.env['auditlog.rule']
@ -368,14 +355,14 @@ class AuditlogRule(models.Model):
diff = DictDiffer( diff = DictDiffer(
new_values.get(res_id, EMPTY_DICT), new_values.get(res_id, EMPTY_DICT),
old_values.get(res_id, EMPTY_DICT)) old_values.get(res_id, EMPTY_DICT))
if method is 'create': if method == 'create':
self._create_log_line_on_create(log, diff.added(), new_values) self._create_log_line_on_create(log, diff.added(), new_values)
elif method is 'read': elif method == 'read':
self._create_log_line_on_read( self._create_log_line_on_read(
log, log,
list(old_values.get(res_id, EMPTY_DICT).keys()), old_values list(old_values.get(res_id, EMPTY_DICT).keys()), old_values
) )
elif method is 'write': elif method == 'write':
self._create_log_line_on_write( self._create_log_line_on_write(
log, diff.changed(), old_values, new_values) log, diff.changed(), old_values, new_values)
@ -513,7 +500,6 @@ class AuditlogRule(models.Model):
vals['new_value_text'] = new_value_text vals['new_value_text'] = new_value_text
return vals return vals
@api.multi
def subscribe(self): def subscribe(self):
"""Subscribe Rule for auditing changes on model and apply shortcut """Subscribe Rule for auditing changes on model and apply shortcut
to view logs on that model. to view logs on that model.
@ -526,7 +512,6 @@ class AuditlogRule(models.Model):
vals = { vals = {
'name': _("View logs"), 'name': _("View logs"),
'res_model': 'auditlog.log', 'res_model': 'auditlog.log',
'src_model': rule.model_id.model,
'binding_model_id': rule.model_id.id, 'binding_model_id': rule.model_id.id,
'domain': domain, 'domain': domain,
} }
@ -534,7 +519,6 @@ class AuditlogRule(models.Model):
rule.write({'state': 'subscribed', 'action_id': act_window.id}) rule.write({'state': 'subscribed', 'action_id': act_window.id})
return True return True
@api.multi
def unsubscribe(self): def unsubscribe(self):
"""Unsubscribe Auditing Rule on model.""" """Unsubscribe Auditing Rule on model."""
# Revert patched methods # Revert patched methods

View File

@ -1,3 +1,4 @@
* Sebastien Alix <sebastien.alix@camptocamp.com> * Sebastien Alix <sebastien.alix@camptocamp.com>
* Holger Brunn <hbrunn@therp.nl> * Holger Brunn <hbrunn@therp.nl>
* Holden Rehg <holdenrehg@gmail.com> * Holden Rehg <holdenrehg@gmail.com>
* Eric Lembregts <eric@lembregts.eu>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>Audit Log</title> <title>Audit Log</title>
<style type="text/css"> <style type="text/css">
@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/server-tools/tree/12.0/auditlog"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-auditlog"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/149/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/server-tools/tree/13.0/auditlog"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-tools-13-0/server-tools-13-0-auditlog"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/149/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows the administrator to log user operations performed on data <p>This module allows the administrator to log user operations performed on data
models such as <tt class="docutils literal">create</tt>, <tt class="docutils literal">read</tt>, <tt class="docutils literal">write</tt> and <tt class="docutils literal">delete</tt>.</p> models such as <tt class="docutils literal">create</tt>, <tt class="docutils literal">read</tt>, <tt class="docutils literal">write</tt> and <tt class="docutils literal">delete</tt>.</p>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
@ -416,7 +416,7 @@ To activate it and/or change the delay, go to the
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -433,6 +433,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Sebastien Alix &lt;<a class="reference external" href="mailto:sebastien.alix&#64;camptocamp.com">sebastien.alix&#64;camptocamp.com</a>&gt;</li> <li>Sebastien Alix &lt;<a class="reference external" href="mailto:sebastien.alix&#64;camptocamp.com">sebastien.alix&#64;camptocamp.com</a>&gt;</li>
<li>Holger Brunn &lt;<a class="reference external" href="mailto:hbrunn&#64;therp.nl">hbrunn&#64;therp.nl</a>&gt;</li> <li>Holger Brunn &lt;<a class="reference external" href="mailto:hbrunn&#64;therp.nl">hbrunn&#64;therp.nl</a>&gt;</li>
<li>Holden Rehg &lt;<a class="reference external" href="mailto:holdenrehg&#64;gmail.com">holdenrehg&#64;gmail.com</a>&gt;</li> <li>Holden Rehg &lt;<a class="reference external" href="mailto:holdenrehg&#64;gmail.com">holdenrehg&#64;gmail.com</a>&gt;</li>
<li>Eric Lembregts &lt;<a class="reference external" href="mailto:eric&#64;lembregts.eu">eric&#64;lembregts.eu</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="other-credits"> <div class="section" id="other-credits">
@ -448,7 +449,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/12.0/auditlog">OCA/server-tools</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/13.0/auditlog">OCA/server-tools</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>

View File

@ -43,7 +43,7 @@
<field name="name">auditlog.rule.tree</field> <field name="name">auditlog.rule.tree</field>
<field name="model">auditlog.rule</field> <field name="model">auditlog.rule</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree colors="blue:state == 'draft';black:state == 'subscribed'" string="Rules"> <tree decoration-info="state == 'draft'" decoration-bf="state == 'subscribed'">
<field name="name"/> <field name="name"/>
<field name="model_id"/> <field name="model_id"/>
<field name="log_type"/> <field name="log_type"/>
@ -79,7 +79,6 @@
<field name="name">Rules</field> <field name="name">Rules</field>
<field name="res_model">auditlog.rule</field> <field name="res_model">auditlog.rule</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="context">{}</field> <field name="context">{}</field>
<field name="search_view_id" ref="view_auditlog_rule_search"/> <field name="search_view_id" ref="view_auditlog_rule_search"/>
@ -145,7 +144,7 @@
<field name="name">auditlog.log.tree</field> <field name="name">auditlog.log.tree</field>
<field name="model">auditlog.log</field> <field name="model">auditlog.log</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Logs" create="false"> <tree create="false">
<field name="create_date"/> <field name="create_date"/>
<field name="name"/> <field name="name"/>
<field name="model_id"/> <field name="model_id"/>
@ -192,7 +191,6 @@
<record model="ir.actions.act_window" id="action_auditlog_log_tree"> <record model="ir.actions.act_window" id="action_auditlog_log_tree">
<field name="name">Logs</field> <field name="name">Logs</field>
<field name="res_model">auditlog.log</field> <field name="res_model">auditlog.log</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="view_auditlog_log_search"/> <field name="search_view_id" ref="view_auditlog_log_search"/>
</record> </record>

View File

@ -25,7 +25,7 @@
<field name="name">auditlog.http.request.tree</field> <field name="name">auditlog.http.request.tree</field>
<field name="model">auditlog.http.request</field> <field name="model">auditlog.http.request</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="HTTP Requests"> <tree>
<field name="name"/> <field name="name"/>
<field name="create_date"/> <field name="create_date"/>
<field name="http_session_id"/> <field name="http_session_id"/>
@ -68,7 +68,6 @@
<field name="name">HTTP Requests</field> <field name="name">HTTP Requests</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">auditlog.http.request</field> <field name="res_model">auditlog.http.request</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_auditlog_http_request_tree"/> <field name="view_id" ref="view_auditlog_http_request_tree"/>
</record> </record>

View File

@ -23,7 +23,7 @@
<field name="name">auditlog.http.session.tree</field> <field name="name">auditlog.http.session.tree</field>
<field name="model">auditlog.http.session</field> <field name="model">auditlog.http.session</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="User sessions"> <tree>
<field name="user_id"/> <field name="user_id"/>
<field name="create_date"/> <field name="create_date"/>
<field name="name"/> <field name="name"/>
@ -55,7 +55,6 @@
<field name="name">User sessions</field> <field name="name">User sessions</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">auditlog.http.session</field> <field name="res_model">auditlog.http.session</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_auditlog_http_session_tree"/> <field name="view_id" ref="view_auditlog_http_session_tree"/>
</record> </record>