Turkesh Patel (openERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-978741-tpa into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-978741-tpa/+merge/101707
Audittrail
========================================================
[Fix]: set proper "Resource Name" in in the object "audittrai.log".
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-978741-tpa/+merge/101707
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-978741-tpa.
=== modified file 'audittrail/audittrail.py'
--- audittrail/audittrail.py 2012-03-30 09:08:37 +0000
+++ audittrail/audittrail.py 2012-04-12 10:06:19 +0000
@@ -434,6 +434,7 @@
on specific fields only.
:return: True
"""
+ resource_pool = pool.get(model.model)
# loop on all the given ids
for res_id in res_ids:
# compare old and new values and get audittrail log lines accordingly
@@ -441,11 +442,13 @@
# if at least one modification has been found
for model_id, resource_id in lines:
+ res_name = resource_pool.browse(cr, uid, resource_id).name
vals = {
'method': method,
'object_id': model_id,
'user_id': uid,
'res_id': resource_id,
+ 'name': res_name or '',
}
if (model_id, resource_id) not in old_values and method not in ('copy', 'read'):
# the resource was not existing so we are forcing the method to 'create'
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp