|
|
@ -213,7 +213,7 @@ class auditlog_rule(models.Model): |
|
|
|
new_record = create.origin(self, vals, **kwargs) |
|
|
|
new_values = dict( |
|
|
|
(d['id'], d) for d in new_record.sudo().read( |
|
|
|
list(self._columns))) |
|
|
|
list(self._fields))) |
|
|
|
rule_model.sudo().create_logs( |
|
|
|
self.env.uid, self._name, new_record.ids, |
|
|
|
'create', None, new_values) |
|
|
@ -270,10 +270,10 @@ class auditlog_rule(models.Model): |
|
|
|
self = self.with_context(auditlog_disabled=True) |
|
|
|
rule_model = self.env['auditlog.rule'] |
|
|
|
old_values = dict( |
|
|
|
(d['id'], d) for d in self.sudo().read(list(self._columns))) |
|
|
|
(d['id'], d) for d in self.sudo().read(list(self._fields))) |
|
|
|
result = write.origin(self, vals, **kwargs) |
|
|
|
new_values = dict( |
|
|
|
(d['id'], d) for d in self.sudo().read(list(self._columns))) |
|
|
|
(d['id'], d) for d in self.sudo().read(list(self._fields))) |
|
|
|
rule_model.sudo().create_logs( |
|
|
|
self.env.uid, self._name, self.ids, |
|
|
|
'write', old_values, new_values) |
|
|
@ -287,7 +287,7 @@ class auditlog_rule(models.Model): |
|
|
|
self = self.with_context(auditlog_disabled=True) |
|
|
|
rule_model = self.env['auditlog.rule'] |
|
|
|
old_values = dict( |
|
|
|
(d['id'], d) for d in self.sudo().read(list(self._columns))) |
|
|
|
(d['id'], d) for d in self.sudo().read(list(self._fields))) |
|
|
|
rule_model.sudo().create_logs( |
|
|
|
self.env.uid, self._name, self.ids, 'unlink', old_values) |
|
|
|
return unlink.origin(self, **kwargs) |
|
|
|