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
No known key found for this signature in database
GPG Key ID: 1A2546A1B7BA2451
1 changed files with
3 additions and
1 deletions
-
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 |
|
|
|
|
|
|
|