~odossmann/unifield-web/UF_2123

« back to all changes in this revision

Viewing changes to addons/openerp/controllers/listgrid.py

  • Committer: jf
  • Date: 2013-09-10 08:03:59 UTC
  • mfrom: (4712.1.8 web-jfb-utp-732-727)
  • Revision ID: jfb@tempo-consulting.fr-20130910080359-qkk1bz9nnxwnsm90
UTP-732 [IMP] Entering cash register closing balance (cash count) is extremely slow
UTP-727 [IMP]Error message appears when trying to display 500 entries on the same page (change limit)
lp:~unifield-team/unifield-web/jfb-utp-732-727

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
                if k.startswith('search_default') and k[15:] not in params['_terp_search_data'].get('group_by_ctx',{}):
260
260
                    del params['_terp_context'][k]
261
261
 
262
 
        if params.get('_terp_clear'):
 
262
        if params.get('_terp_clear') or params.get('_terp_ids_to_show'):
263
263
            params.search_domain, params.filter_domain, params.ids = [], [], []
264
264
            params.search_data = {}
265
265
            for k,v in params.context.items():
270
270
                del params.context['group_by']
271
271
            params.group_by_ctx = []
272
272
 
 
273
 
273
274
        if source == '_terp_list':
274
275
            if not params.view_type == 'graph':
275
276
                params.view_type = 'tree'
280
281
            if params.filter_domain:
281
282
                params.domain += params.filter_domain
282
283
 
 
284
        if params.get('_terp_ids_to_show'):
 
285
            params.search_domain = [('id', 'in', params.get('_terp_ids_to_show'))]
 
286
 
283
287
        # default_get context
284
288
        current = params.chain_get(source)
285
289
        if current and params.source_default_get:
290
294
            res = wizard.Wizard().execute(params)
291
295
            frm = res['form']
292
296
        else:
 
297
            params.get_source = source
293
298
            frm = form.Form().create_form(params)
294
299
 
295
300
        if params.view_type == 'graph':
334
339
        id = (id or False) and int(id)
335
340
        ids = (id or []) and [id]
336
341
        list_grid = params.list_grid or '_terp_list'
337
 
 
338
342
        try:
339
343
 
340
344
            if btype == 'workflow':
348
352
            elif btype == 'object':
349
353
                ctx = params.context or {}
350
354
                ctx.update(rpc.session.context.copy())
 
355
                if list_grid != '_terp_list':
 
356
                    ctx['from_list_grid'] = list_grid
351
357
                res = rpc.session.execute('object', 'execute', model, name, ids, ctx)
352
358
 
353
359
                if isinstance(res, dict):