From 1809bee864a0ded8d03ef2da90db071b089d194f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 3 Oct 2015 12:00:28 +0200 Subject: [PATCH] Use ModelData.get_id instead of searching issue5006 review22481002 --- sale.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sale.py b/sale.py index b0f8a499bb..55c87f0e30 100644 --- a/sale.py +++ b/sale.py @@ -1525,13 +1525,7 @@ class OpenCustomer(Wizard): customer_ids = [line[0] for line in Transaction().cursor.fetchall()] action['pyson_domain'] = PYSONEncoder().encode( [('id', 'in', customer_ids)]) - - model_data, = ModelData.search([ - ('fs_id', '=', 'act_open_customer'), - ('module', '=', 'sale'), - ], limit=1) - wizard = Wizard(model_data.db_id) - + wizard = Wizard(ModelData.get_id('sale', 'act_open_customer')) action['name'] = wizard.name return action, {}