[Erp5-report] r39202 rafael - in /erp5/trunk/bt5/erp5_wizard: ExtensionTemplateItem/ SkinTe...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 14 21:12:08 CEST 2010
Author: rafael
Date: Thu Oct 14 21:12:07 2010
New Revision: 39202
URL: http://svn.erp5.org?rev=39202&view=rev
Log:
Included a utility script get important informations. This is usefull to check if information is appropriated.
Added:
erp5/trunk/bt5/erp5_wizard/ExtensionTemplateItem/
erp5/trunk/bt5/erp5_wizard/ExtensionTemplateItem/WizardUtils.py
erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/ERP5Site_getERP5InstanceState.xml
erp5/trunk/bt5/erp5_wizard/bt/template_extension_id_list
Modified:
erp5/trunk/bt5/erp5_wizard/bt/revision
Added: erp5/trunk/bt5/erp5_wizard/ExtensionTemplateItem/WizardUtils.py
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/ExtensionTemplateItem/WizardUtils.py?rev=39202&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/ExtensionTemplateItem/WizardUtils.py (added)
+++ erp5/trunk/bt5/erp5_wizard/ExtensionTemplateItem/WizardUtils.py [utf8] Thu Oct 14 21:12:07 2010
@@ -0,0 +1,60 @@
+##############################################################################
+#
+# Copyright (c) 2002-2009 Nexedi SA and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsability of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# garantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+##############################################################################
+
+def ERP5Site_getERP5InstanceState(self, witch_login=None, witch_password=None):
+ """
+ This script get some information from the instance. This usefull for
+ compare informations and verify the status of the instance.
+ """
+ result = {}
+ preferences = {}
+ portal = self.getPortalObject()
+ portal_preferences = portal.portal_preferences
+ portal_wizard = portal.portal_wizard
+
+ # wizard authentication
+ if witch_password is not None and witch_login is not None:
+ result['witch_authentication'] = portal_wizard._isCorrectConfigurationKey(witch_login, witch_password)
+ else:
+ result['witch_authentication'] = -1
+
+ for accessor_name in ('PreferredExpressUserId',
+ 'PreferredExpressPassword',
+ 'PreferredWitchToolServerUrl',
+ 'PreferredWitchToolServerRoot',
+ 'PreferredExpressSubscriptionStatus',
+ 'PreferredExpressErp5Uid',
+ 'PreferredHtmlStyleAccessTab',):
+ preferences[accessor_name] = getattr(portal_preferences, 'get%s' % accessor_name)()
+ result['preference_dict'] = preferences
+ # bt5 list
+ result['bt5_list'] = [{'title': x.getTitle(),
+ 'version': x.getVersion(),
+ 'revision': x.getRevision()} for x in
+ portal.portal_templates.getInstalledBusinessTemplateList()]
+
+ return result
Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/ERP5Site_getERP5InstanceState.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/ERP5Site_getERP5InstanceState.xml?rev=39202&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/ERP5Site_getERP5InstanceState.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/ERP5Site_getERP5InstanceState.xml [utf8] Thu Oct 14 21:12:07 2010
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_function</string> </key>
+ <value> <string>ERP5Site_getERP5InstanceState</string> </value>
+ </item>
+ <item>
+ <key> <string>_module</string> </key>
+ <value> <string>WizardUtils</string> </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>ERP5Site_getERP5InstanceState</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_wizard/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/bt/revision?rev=39202&r1=39201&r2=39202&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_wizard/bt/revision [utf8] Thu Oct 14 21:12:07 2010
@@ -1 +1 @@
-152
\ No newline at end of file
+153
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_wizard/bt/template_extension_id_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/bt/template_extension_id_list?rev=39202&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/bt/template_extension_id_list (added)
+++ erp5/trunk/bt5/erp5_wizard/bt/template_extension_id_list [utf8] Thu Oct 14 21:12:07 2010
@@ -0,0 +1 @@
+WizardUtils
\ No newline at end of file
More information about the Erp5-report
mailing list