From b8b3cd07fd625b04ed3a01267599230ccdc16507 Mon Sep 17 00:00:00 2001 From: resteve Date: Mon, 29 Sep 2014 10:13:22 +0200 Subject: [PATCH] review code --- product_oneclick.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/product_oneclick.py b/product_oneclick.py index 35cd532..cc0b605 100644 --- a/product_oneclick.py +++ b/product_oneclick.py @@ -7,10 +7,7 @@ from trytond.pyson import Eval, PYSONEncoder from trytond.wizard import Wizard, StateView, StateAction, StateTransition, \ Button -__all__ = [ - 'ProductOneClickView', - 'ProductOneClick', -] +__all__ = ['ProductOneClickView', 'ProductOneClick'] class ProductOneClickView(ModelView): @@ -150,11 +147,10 @@ class ProductOneClick(Wizard): return values def transition_create_(self, values=False): - ''' - Create a product - ''' - Template = Pool().get('product.template') - Product = Pool().get('product.product') + '''Create a product''' + pool = Pool() + Template = pool.get('product.template') + Product = pool.get('product.product') name = self.view.name code = self.view.code