Browse Source

[ADD] pass old_values to create_log when deleting a record

pull/1040/head
Holger Brunn 10 years ago
committed by Enric Tobella
parent
commit
5b4d117657
No known key found for this signature in database GPG Key ID: 1A2546A1B7BA2451
  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