Somesh Khare(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-opw-573037-skh into
lp:openobject-addons/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-573037-skh/+merge/99020
Hello Sir,
[Fix]: Audittrail : Audit trail doesn't respect access rights
Steps:
1. Create a database and install audit trail module.
2. Assign all managerial access rights to demo user.
3. Do login with demo user and go to the Settings/ Reporting/ Audit/
Audit Rules.
4. Create a rule and Click on Subscribe.
5. You will get access right error, even though I assigned same access
rights as Administration.
This branch fixes this issue.
Thanks
Somesh Khare
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-573037-skh/+merge/99020
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-opw-573037-skh.
=== modified file 'audittrail/audittrail.py'
--- audittrail/audittrail.py 2011-11-21 16:27:12 +0000
+++ audittrail/audittrail.py 2012-03-23 13:32:25 +0000
@@ -86,7 +86,7 @@
self.write(cr, uid, [thisrule.id], {"state": "subscribed", "action_id": action_id})
keyword = 'client_action_relate'
value = 'ir.actions.act_window,' + str(action_id)
- res = obj_model.ir_set(cr, uid, 'action', keyword, 'View_log_' + thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
+ res = obj_model.ir_set(cr, 1, 'action', keyword, 'View_log_' + thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
#End Loop
return True
@@ -108,7 +108,7 @@
setattr(function[0], function[1], function[2])
w_id = obj_action.search(cr, uid, [('name', '=', 'View Log'), ('res_model', '=', 'audittrail.log'), ('src_model', '=', thisrule.object_id.model)])
if w_id:
- obj_action.unlink(cr, uid, w_id)
+ obj_action.unlink(cr, 1, w_id)
value = "ir.actions.act_window" + ',' + str(w_id[0])
val_id = ir_values_obj.search(cr, uid, [('model', '=', thisrule.object_id.model), ('value', '=', value)])
if val_id:
_______________________________________________
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