diff --git a/auditlog/models/log.py b/auditlog/models/log.py index 32d8de36e..b222c470e 100644 --- a/auditlog/models/log.py +++ b/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') diff --git a/auditlog/models/rule.py b/auditlog/models/rule.py index c9eef875f..834fa7e1b 100644 --- a/auditlog/models/rule.py +++ b/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,