From 729d542ac2dd540852c966fca750c0e41498770d Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Wed, 14 Nov 2007 09:01:09 +0000
Subject: [PATCH] When proxifying form, search only for forms which contains
 '_view' in their ID.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17563 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Form/Form.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Form/Form.py b/product/ERP5Form/Form.py
index 1ec4f5f3e0..0495066a22 100644
--- a/product/ERP5Form/Form.py
+++ b/product/ERP5Form/Form.py
@@ -645,7 +645,8 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
         def iterate(obj):
             for i in obj.objectValues():
                 if (i.meta_type=='ERP5 Form' and
-                    i.getId().endswith('FieldLibrary')):
+                    i.getId().endswith('FieldLibrary') and 
+                    '_view' in i.getId()):
                     form_id = i.getId()
                     form_path = '%s.%s' % (obj.getId(), form_id)
                     field_list = []
-- 
2.30.9