From 2a6211e0a6dd99cef7d890cd7bcab54656072d94 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Fri, 17 Jun 2011 18:18:07 +0300 Subject: [PATCH] ps_form: fix order of lines in create() Found by pyflakes check: we need to define 'pool' first, and then call it! (cherry picked from commit 68c241ed3adce7737465577da70f1ff76ebdeb39) bzr revid: xrg@linux.gr-20110617151807-dfjyo4460hrrg7jy --- bin/report/printscreen/ps_form.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/report/printscreen/ps_form.py b/bin/report/printscreen/ps_form.py index 227e3084bbf..09946467143 100644 --- a/bin/report/printscreen/ps_form.py +++ b/bin/report/printscreen/ps_form.py @@ -54,15 +54,15 @@ class report_printscreen_list(report_int): if not context: context={} datas['ids'] = ids - model = pool.get(datas['model']) pool = pooler.get_pool(cr.dbname) + model = pool.get(datas['model']) # title come from description of model which are specified in py file. self.title = model._description result = model.fields_view_get(cr, uid, view_type='form', context=context) fields_order = self._parse_string(result['arch']) rows = model.read(cr, uid, datas['ids'], result['fields'].keys() ) - res = self._create_table(uid, datas['ids'], result['fields'], fields_order, rows, context, model._description) + self._create_table(uid, datas['ids'], result['fields'], fields_order, rows, context, model._description) return (self.obj.get(), 'pdf')