From 985ddf3baf15f2dcdf91c941841f83800d7fcc06 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 4 Feb 2014 15:28:25 +0100 Subject: [PATCH] [FIX] auditrail: in case of unlink retrieve first the record and then execute the unlink (the other way around is causes problems for name_get...) bzr revid: mat@openerp.com-20140204142825-jtln4kyfmfhgq4sd --- addons/audittrail/audittrail.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index 0de34f4b69d..63b505e0007 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -286,7 +286,9 @@ class audittrail_objects_proxy(object_proxy): elif method == 'unlink': res_ids = args[0] old_values = self.get_data(cr, uid_orig, pool, res_ids, model, method) - res = fct_src(cr, uid_orig, model.model, method, *args, **kw) + # process_data first as fct_src will unlink the record + self.process_data(cr, uid_orig, pool, res_ids, model, method, old_values, new_values, field_list) + return fct_src(cr, uid_orig, model.model, method, *args, **kw) else: # method is write, action or workflow action res_ids = [] if args: