|
@ -72,7 +72,7 @@ class AuditlogRule(models.Model): |
|
|
u"Log Creates", default=True, |
|
|
u"Log Creates", default=True, |
|
|
help=(u"Select this if you want to keep track of creation on any " |
|
|
help=(u"Select this if you want to keep track of creation on any " |
|
|
u"record of the model of this rule")) |
|
|
u"record of the model of this rule")) |
|
|
log_custom = fields.Boolean( |
|
|
|
|
|
|
|
|
log_custom_method = fields.Boolean( |
|
|
u"Log Methods", |
|
|
u"Log Methods", |
|
|
help=(u"Select this if you want to keep track of custom methods on " |
|
|
help=(u"Select this if you want to keep track of custom methods on " |
|
|
u"any record of the model of this rule")) |
|
|
u"any record of the model of this rule")) |
|
@ -162,7 +162,7 @@ class AuditlogRule(models.Model): |
|
|
updated = True |
|
|
updated = True |
|
|
# Check if custom methods are enabled and patch the different |
|
|
# Check if custom methods are enabled and patch the different |
|
|
# rule methods |
|
|
# rule methods |
|
|
if getattr(rule, 'log_custom'): |
|
|
|
|
|
|
|
|
if getattr(rule, 'log_custom_method'): |
|
|
for custom_method in rule.custom_method_ids: |
|
|
for custom_method in rule.custom_method_ids: |
|
|
check_attr = 'auditlog_ruled_%s' % custom_method.name |
|
|
check_attr = 'auditlog_ruled_%s' % custom_method.name |
|
|
|
|
|
|
|
@ -196,7 +196,7 @@ class AuditlogRule(models.Model): |
|
|
getattr(model_model, method), 'origin'): |
|
|
getattr(model_model, method), 'origin'): |
|
|
model_model._revert_method(method) |
|
|
model_model._revert_method(method) |
|
|
updated = True |
|
|
updated = True |
|
|
if hasattr(rule, 'log_custom'): |
|
|
|
|
|
|
|
|
if hasattr(rule, 'log_custom_method'): |
|
|
for custom_method in rule.custom_method_ids: |
|
|
for custom_method in rule.custom_method_ids: |
|
|
method = custom_method.name |
|
|
method = custom_method.name |
|
|
if hasattr(getattr(model_model, method), 'origin'): |
|
|
if hasattr(getattr(model_model, method), 'origin'): |
|
|