Browse Source
[FIX] if someone else has overridden our patched,
method, don't do anything
pull/1040/head
Holger Brunn
9 years ago
committed by
Enric Tobella
No known key found for this signature in database
GPG Key ID: 1A2546A1B7BA2451
1 changed files with
2 additions and
1 deletions
-
auditlog/models/rule.py
|
|
@ -170,7 +170,8 @@ class auditlog_rule(models.Model): |
|
|
|
for rule in self: |
|
|
|
model_model = self.env[rule.model_id.model] |
|
|
|
for method in ['create', 'read', 'write', 'unlink']: |
|
|
|
if getattr(rule, 'log_%s' % method): |
|
|
|
if getattr(rule, 'log_%s' % method) and hasattr( |
|
|
|
getattr(model_model, method), 'origin'): |
|
|
|
model_model._revert_method(method) |
|
|
|
updated = True |
|
|
|
if updated: |
|
|
|