From 2318a618f06da3fd6871bcdffa46f9ceec03dbcf Mon Sep 17 00:00:00 2001 From: sebalix Date: Sat, 31 Oct 2015 20:31:05 +0100 Subject: [PATCH] Module 'auditlog' - Fix pylint check --- auditlog/__manifest__.py | 1 + auditlog/models/log.py | 4 ++-- auditlog/models/rule.py | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/auditlog/__manifest__.py b/auditlog/__manifest__.py index e7361cfdb..3ca68b5e9 100644 --- a/auditlog/__manifest__.py +++ b/auditlog/__manifest__.py @@ -23,6 +23,7 @@ 'name': "Audit Log", 'version': "8.0.1.1.0", 'author': "ABF OSIELL,Odoo Community Association (OCA)", + 'license': "AGPL-3", 'website': "http://www.osiell.com", 'category': "Tools", 'depends': [ diff --git a/auditlog/models/log.py b/auditlog/models/log.py index bff2fdba2..e8b35ad44 100644 --- a/auditlog/models/log.py +++ b/auditlog/models/log.py @@ -22,7 +22,7 @@ from openerp import models, fields -class auditlog_log(models.Model): +class AuditlogLog(models.Model): _name = 'auditlog.log' _description = "Auditlog - Log" _order = "create_date desc" @@ -42,7 +42,7 @@ class auditlog_log(models.Model): 'auditlog.http.request', string=u"HTTP Request") -class auditlog_log_line(models.Model): +class AuditlogLogLine(models.Model): _name = 'auditlog.log.line' _description = "Auditlog - Log details (fields updated)" diff --git a/auditlog/models/rule.py b/auditlog/models/rule.py index 36701dd08..7fa4403ec 100644 --- a/auditlog/models/rule.py +++ b/auditlog/models/rule.py @@ -58,7 +58,7 @@ class DictDiffer(object): if self.past_dict[o] == self.current_dict[o]) -class auditlog_rule(models.Model): +class AuditlogRule(models.Model): _name = 'auditlog.rule' _description = "Auditlog - Rule" @@ -110,7 +110,7 @@ class auditlog_rule(models.Model): def _register_hook(self, cr, ids=None): """Get all rules and apply them to log method calls.""" - super(auditlog_rule, self)._register_hook(cr) + super(AuditlogRule, self)._register_hook(cr) if not hasattr(self.pool, '_auditlog_field_cache'): self.pool._auditlog_field_cache = {} if not hasattr(self.pool, '_auditlog_model_cache'): @@ -182,7 +182,7 @@ class auditlog_rule(models.Model): # errors occurs with the `_register_hook()` BaseModel method. def create(self, cr, uid, vals, context=None): """Update the registry when a new rule is created.""" - res_id = super(auditlog_rule, self).create( + res_id = super(AuditlogRule, self).create( cr, uid, vals, context=context) if self._register_hook(cr, [res_id]): modules.registry.RegistryManager.signal_registry_change(cr.dbname) @@ -194,7 +194,7 @@ class auditlog_rule(models.Model): """Update the registry when existing rules are updated.""" if isinstance(ids, (int, long)): ids = [ids] - super(auditlog_rule, self).write(cr, uid, ids, vals, context=context) + super(AuditlogRule, self).write(cr, uid, ids, vals, context=context) if self._register_hook(cr, ids): modules.registry.RegistryManager.signal_registry_change(cr.dbname) return True @@ -203,7 +203,7 @@ class auditlog_rule(models.Model): def unlink(self): """Unsubscribe rules before removing them.""" self.unsubscribe() - return super(auditlog_rule, self).unlink() + return super(AuditlogRule, self).unlink() def _make_create(self): """Instanciate a create method that log its calls."""