Browse Source

[IMP] Module 'auditlog' - Model 'auditlog.log.line', 'field_name' and 'field_description' fields changed into related fields

pull/119/head
sebalix 10 years ago
parent
commit
74588493cd
  1. 5
      auditlog/models/log.py
  2. 4
      auditlog/models/rule.py

5
auditlog/models/log.py

@ -50,5 +50,6 @@ class auditlog_log_line(models.Model):
new_value = fields.Text(u"New Value")
old_value_text = fields.Text(u"Old value Text")
new_value_text = fields.Text(u"New value Text")
field_name = fields.Char(u"Technical name", size=64)
field_description = fields.Char(u"Description", size=64)
field_name = fields.Char(u"Technical name", related='field_id.name')
field_description = fields.Char(
u"Description", related='field_id.field_description')

4
auditlog/models/rule.py

@ -342,8 +342,6 @@ class auditlog_rule(models.Model):
"""
vals = {
'field_id': field.id,
'field_name': field.name,
'field_description': field.field_description,
'log_id': log.id,
'old_value': old_values[log.res_id][field.name],
'old_value_text': old_values[log.res_id][field.name],
@ -378,8 +376,6 @@ class auditlog_rule(models.Model):
"""
vals = {
'field_id': field.id,
'field_name': field.name,
'field_description': field.field_description,
'log_id': log.id,
'old_value': False,
'old_value_text': False,

Loading…
Cancel
Save