~openerp-dev/openobject-server/printscreen_group_no_lief

« back to all changes in this revision

Viewing changes to bin/addons/base/ir/ir_actions.py

[Merge] trunk-dev-framework

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
        (_check_model, 'Invalid model name in the action definition.', ['res_model','src_model'])
159
159
    ]
160
160
 
161
 
    def get_filters(self, cr, uid, model):
162
 
        cr.execute('SELECT id FROM ir_act_window a WHERE a.id not in (SELECT act_id FROM ir_act_window_user_rel) AND a.res_model=\''+model+'\' and a.filter=\'1\';')
163
 
        all_ids = cr.fetchall()
164
 
        filter_ids =  map(lambda x:x[0],all_ids)
165
 
        act_ids = self.search(cr,uid,[('res_model','=',model),('filter','=',1),('default_user_ids','in',(','.join(map(str,[uid,])),))])
166
 
        act_ids += filter_ids
167
 
        act_ids = list(set(act_ids))
168
 
        my_acts = self.read(cr, uid, act_ids, ['name', 'domain','context'])
169
 
        return my_acts
170
 
 
171
161
    def _views_get_fnc(self, cr, uid, ids, name, arg, context={}):
172
162
        res={}
173
163
        for act in self.browse(cr, uid, ids):