[Erp5-report] r20480 - /erp5/trunk/products/ERP5Form/Extensions/
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 14 12:52:04 CEST 2008
Author: fabien
Date: Mon Apr 14 12:52:03 2008
New Revision: 20480
URL: http://svn.erp5.org?rev=20480&view=rev
Log:
search the form using id instead of searchterm. In this way, we are sure that
all results have the same id.
In case of more than one result, display the list of result. This is helpful to
understand why an update could not be done
Modified:
erp5/trunk/products/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py
Modified: erp5/trunk/products/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py?rev=20480&r1=20479&r2=20480&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py (original)
+++ erp5/trunk/products/ERP5Form/Extensions/ERP5Site_updateModuleScribus.py Mon Apr 14 12:52:03 2008
@@ -83,7 +83,7 @@
temp_portal_type = object_portal_type.replace(' ', '')
search_param = {
'obj_metatypes': 'ERP5 Form',
- 'obj_searchterm': '%s_view' % temp_portal_type,
+ 'obj_ids': ['%s_view' % temp_portal_type,],
'search_sub': 1
}
result = portal.portal_skins.PrincipiaFind( portal.portal_skins,
@@ -98,7 +98,7 @@
# We should have only one result
if len(good_result) > 1:
raise ValueError, "Error: There is more than one result for the "\
- "view '%s_view'" % object_portal_type
+ "view '%s_view' : %s" % (object_portal_type, good_result)
elif len(good_result) < 1:
raise ValueError, "Error: There is no result for the view "\
"'%s_view'" % object_portal_type
More information about the Erp5-report
mailing list