Browse Source

[ADD] pass old_values to create_log when deleting a record

pull/119/head
Holger Brunn 10 years ago
parent
commit
153bb5c3e6
  1. 4
      auditlog/models/rule.py

4
auditlog/models/rule.py

@ -274,8 +274,10 @@ class auditlog_rule(models.Model):
@api.multi
def unlink(self, **kwargs):
rule_model = self.env['auditlog.rule']
old_values = dict(
(d['id'], d) for d in self.sudo().read(list(self._columns)))
rule_model.sudo().create_logs(
self.env.uid, self._name, self.ids, 'unlink')
self.env.uid, self._name, self.ids, 'unlink', old_values)
return unlink.origin(self, **kwargs)
return unlink

Loading…
Cancel
Save