From 928171ffe79bc8db58e138db1e3ffabeb2cc82da Mon Sep 17 00:00:00 2001 From: "Sanjay Gohel (Open ERP)" Date: Mon, 26 Mar 2012 17:15:56 +0530 Subject: [PATCH] [IMP]give rights to registration bzr revid: sgo@tinyerp.com-20120326114556-5hfi4wga6y7w455p --- addons/event_share/wizard/wizard_share.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/event_share/wizard/wizard_share.py b/addons/event_share/wizard/wizard_share.py index 02b5ae26009..8179781f432 100644 --- a/addons/event_share/wizard/wizard_share.py +++ b/addons/event_share/wizard/wizard_share.py @@ -37,9 +37,11 @@ class share_wizard_event(osv.osv_memory): """ res = super(share_wizard_event, self)._add_access_rights_for_share_group(cr, uid, group_id, mode, fields_relations, context=context) access_model = self.pool.get('ir.model.access') + access_ids = access_model.search(cr,uid,[('group_id','=',group_id)],context = context) - access_model.write(cr, uid, access_ids, {'perm_read': True, 'perm_write': True}) - return res + for record in access_model.browse(cr,uid,access_ids,context = context): + if record.model_id.model == 'event.registration': + access_model.write(cr, uid, record.id, {'perm_read': True, 'perm_write': True,'perm_create':True}) share_wizard_event()