|
|
@ -21,8 +21,11 @@ class ResUsers(models.Model): |
|
|
|
def fetch_export_models(self, cr, uid): |
|
|
|
groups_id = [group.id for group in self.browse(cr, uid, uid).groups_id] |
|
|
|
accessobj = self.pool['ir.model.access'] |
|
|
|
accessobj_ids = accessobj.search(cr, uid, [('perm_export','=',True),('group_id','in',groups_id)]) |
|
|
|
model_names = [access_obj.model_id.model for access_obj in accessobj.browse(cr, uid, accessobj_ids)] |
|
|
|
#make distinct value in list |
|
|
|
accessobj_ids = accessobj.search(cr, uid, [('perm_export', '=', True), |
|
|
|
('group_id', 'in', |
|
|
|
groups_id)]) |
|
|
|
model_names = [access_obj.model_id.model for access_obj in |
|
|
|
accessobj.browse(cr, uid, accessobj_ids)] |
|
|
|
# Make distinct value in list |
|
|
|
model_names = list(set(model_names)) |
|
|
|
return model_names |