From 19939397d2877e290ee4357118c85adba381e595 Mon Sep 17 00:00:00 2001 From: Rafael Monnerat <rafael@nexedi.com> Date: Tue, 2 Aug 2011 00:54:49 -0300 Subject: [PATCH] ERP5 Configurator: Drop "Export Customer BT5 Configurator Item" This Configurator Item was a Legacy which has no importance anymore, as Business Template is not exported and installed on third party Instances during the configuration. --- .../view.xml | 79 ------------------- .../view.xml | 79 ------------------- .../allowed_content_types.xml | 1 - ...20Customer%20BT5%20Configurator%20Item.xml | 36 --------- ...sh%20Fake%20Site%20Configurator%20Item.xml | 32 -------- bt5/erp5_configurator/bt/revision | 2 +- .../bt/template_action_path_list | 2 - ...late_portal_type_allowed_content_type_list | 1 - .../bt/template_portal_type_id_list | 2 - ...onfiguration_displayConsultingDownload.xml | 3 - .../BusinessConfiguration_displayDownload.xml | 3 - bt5/erp5_configurator_standard/bt/revision | 2 +- ...sinessConfiguration_displayUNGDownload.xml | 9 +-- bt5/erp5_configurator_ung/bt/revision | 2 +- .../ExportCustomerBT5ConfiguratorItem.py | 68 ---------------- 15 files changed, 7 insertions(+), 314 deletions(-) delete mode 100644 bt5/erp5_configurator/ActionTemplateItem/portal_types/Export%20Customer%20BT5%20Configurator%20Item/view.xml delete mode 100644 bt5/erp5_configurator/ActionTemplateItem/portal_types/Trash%20Fake%20Site%20Configurator%20Item/view.xml delete mode 100644 bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Export%20Customer%20BT5%20Configurator%20Item.xml delete mode 100644 bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Trash%20Fake%20Site%20Configurator%20Item.xml delete mode 100644 product/ERP5Configurator/Document/ExportCustomerBT5ConfiguratorItem.py diff --git a/bt5/erp5_configurator/ActionTemplateItem/portal_types/Export%20Customer%20BT5%20Configurator%20Item/view.xml b/bt5/erp5_configurator/ActionTemplateItem/portal_types/Export%20Customer%20BT5%20Configurator%20Item/view.xml deleted file mode 100644 index 2d13ed581a..0000000000 --- a/bt5/erp5_configurator/ActionTemplateItem/portal_types/Export%20Customer%20BT5%20Configurator%20Item/view.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>action</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </value> - </item> - <item> - <key> <string>categories</string> </key> - <value> - <tuple> - <string>action_type/object_view</string> - </tuple> - </value> - </item> - <item> - <key> <string>category</string> </key> - <value> <string>object_view</string> </value> - </item> - <item> - <key> <string>condition</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>icon</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>view</string> </value> - </item> - <item> - <key> <string>permissions</string> </key> - <value> - <tuple> - <string>View</string> - </tuple> - </value> - </item> - <item> - <key> <string>priority</string> </key> - <value> <float>1.0</float> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string>View</string> </value> - </item> - <item> - <key> <string>visible</string> </key> - <value> <int>1</int> </value> - </item> - </dictionary> - </pickle> - </record> - <record id="2" aka="AAAAAAAAAAI="> - <pickle> - <global name="Expression" module="Products.CMFCore.Expression"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>text</string> </key> - <value> <string>string:${object_url}/CustomerBT5ConfiguratorItem_view</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_configurator/ActionTemplateItem/portal_types/Trash%20Fake%20Site%20Configurator%20Item/view.xml b/bt5/erp5_configurator/ActionTemplateItem/portal_types/Trash%20Fake%20Site%20Configurator%20Item/view.xml deleted file mode 100644 index 4093ae803d..0000000000 --- a/bt5/erp5_configurator/ActionTemplateItem/portal_types/Trash%20Fake%20Site%20Configurator%20Item/view.xml +++ /dev/null @@ -1,79 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="ActionInformation" module="Products.CMFCore.ActionInformation"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>action</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </value> - </item> - <item> - <key> <string>categories</string> </key> - <value> - <tuple> - <string>action_type/object_view</string> - </tuple> - </value> - </item> - <item> - <key> <string>category</string> </key> - <value> <string>object_view</string> </value> - </item> - <item> - <key> <string>condition</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>icon</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>view</string> </value> - </item> - <item> - <key> <string>permissions</string> </key> - <value> - <tuple> - <string>View</string> - </tuple> - </value> - </item> - <item> - <key> <string>priority</string> </key> - <value> <float>1.0</float> </value> - </item> - <item> - <key> <string>title</string> </key> - <value> <string>View</string> </value> - </item> - <item> - <key> <string>visible</string> </key> - <value> <int>1</int> </value> - </item> - </dictionary> - </pickle> - </record> - <record id="2" aka="AAAAAAAAAAI="> - <pickle> - <global name="Expression" module="Products.CMFCore.Expression"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>text</string> </key> - <value> <string>string:${object_url}/TrashFakeSiteConfiguratorItem_view</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_configurator/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml b/bt5/erp5_configurator/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml index 9c134edf92..b013afb660 100644 --- a/bt5/erp5_configurator/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml +++ b/bt5/erp5_configurator/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml @@ -21,7 +21,6 @@ <item>Category Configurator Item</item> <item>Currency Configurator Item</item> <item>Customer BT5 Configurator Item</item> - <item>Export Customer BT5 Configurator Item</item> <item>Organisation Configurator Item</item> <item>Permission Configurator Item</item> <item>Person Configurator Item</item> diff --git a/bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Export%20Customer%20BT5%20Configurator%20Item.xml b/bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Export%20Customer%20BT5%20Configurator%20Item.xml deleted file mode 100644 index 7ff786bc44..0000000000 --- a/bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Export%20Customer%20BT5%20Configurator%20Item.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Base Type" module="erp5.portal_type"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>content_icon</string> </key> - <value> <string>document.gif</string> </value> - </item> - <item> - <key> <string>content_meta_type</string> </key> - <value> <string>ERP5 Export Customer BT5 Configurator Item</string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string> Create a new bt5 for customer configuration. </string> </value> - </item> - <item> - <key> <string>factory</string> </key> - <value> <string>addExportCustomerBT5ConfiguratorItem</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>Export Customer BT5 Configurator Item</string> </value> - </item> - <item> - <key> <string>type_class</string> </key> - <value> <string>ExportCustomerBT5ConfiguratorItem</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Trash%20Fake%20Site%20Configurator%20Item.xml b/bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Trash%20Fake%20Site%20Configurator%20Item.xml deleted file mode 100644 index 830d6778f9..0000000000 --- a/bt5/erp5_configurator/PortalTypeTemplateItem/portal_types/Trash%20Fake%20Site%20Configurator%20Item.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0"?> -<ZopeData> - <record id="1" aka="AAAAAAAAAAE="> - <pickle> - <global name="Base Type" module="erp5.portal_type"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>content_icon</string> </key> - <value> <string>document.gif</string> </value> - </item> - <item> - <key> <string>content_meta_type</string> </key> - <value> <string>ERP5 Trash Fake Site Configurator Item</string> </value> - </item> - <item> - <key> <string>description</string> </key> - <value> <string> This class will remove used fake site.</string> </value> - </item> - <item> - <key> <string>factory</string> </key> - <value> <string>addTrashFakeSiteConfiguratorItem</string> </value> - </item> - <item> - <key> <string>id</string> </key> - <value> <string>Trash Fake Site Configurator Item</string> </value> - </item> - </dictionary> - </pickle> - </record> -</ZopeData> diff --git a/bt5/erp5_configurator/bt/revision b/bt5/erp5_configurator/bt/revision index e157b5b5f3..7c2b018235 100644 --- a/bt5/erp5_configurator/bt/revision +++ b/bt5/erp5_configurator/bt/revision @@ -1 +1 @@ -520 \ No newline at end of file +521 \ No newline at end of file diff --git a/bt5/erp5_configurator/bt/template_action_path_list b/bt5/erp5_configurator/bt/template_action_path_list index 1ca7e53749..b37cf9c079 100644 --- a/bt5/erp5_configurator/bt/template_action_path_list +++ b/bt5/erp5_configurator/bt/template_action_path_list @@ -10,7 +10,6 @@ Configuration Save | view Configurator Tool | view Currency Configurator Item | view Customer BT5 Configurator Item | view -Export Customer BT5 Configurator Item | view Organisation Configurator Item | view Permission Configurator Item | view Person Configurator Item | view @@ -26,6 +25,5 @@ Site Property Configurator Item | view Solver Configurator Item | view Standard BT5 Configurator Item | view System Preference Configurator Item | view -Trash Fake Site Configurator Item | view Workflow Security Configurator Item | view portal_actions | use_configurator \ No newline at end of file diff --git a/bt5/erp5_configurator/bt/template_portal_type_allowed_content_type_list b/bt5/erp5_configurator/bt/template_portal_type_allowed_content_type_list index 0fcb2af420..41de4750b7 100644 --- a/bt5/erp5_configurator/bt/template_portal_type_allowed_content_type_list +++ b/bt5/erp5_configurator/bt/template_portal_type_allowed_content_type_list @@ -13,7 +13,6 @@ Configuration Save | Categories Spreadsheet Configurator Item Configuration Save | Category Configurator Item Configuration Save | Currency Configurator Item Configuration Save | Customer BT5 Configurator Item -Configuration Save | Export Customer BT5 Configurator Item Configuration Save | Organisation Configurator Item Configuration Save | Permission Configurator Item Configuration Save | Person Configurator Item diff --git a/bt5/erp5_configurator/bt/template_portal_type_id_list b/bt5/erp5_configurator/bt/template_portal_type_id_list index e39f8bb2b4..47a8257eec 100644 --- a/bt5/erp5_configurator/bt/template_portal_type_id_list +++ b/bt5/erp5_configurator/bt/template_portal_type_id_list @@ -10,7 +10,6 @@ Configuration Save Configurator Tool Currency Configurator Item Customer BT5 Configurator Item -Export Customer BT5 Configurator Item Organisation Configurator Item Permission Configurator Item Person Configurator Item @@ -26,5 +25,4 @@ Site Property Configurator Item Solver Configurator Item Standard BT5 Configurator Item System Preference Configurator Item -Trash Fake Site Configurator Item Workflow Security Configurator Item \ No newline at end of file diff --git a/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_consulting/BusinessConfiguration_displayConsultingDownload.xml b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_consulting/BusinessConfiguration_displayConsultingDownload.xml index ea0e786835..6aacf2438a 100644 --- a/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_consulting/BusinessConfiguration_displayConsultingDownload.xml +++ b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_consulting/BusinessConfiguration_displayConsultingDownload.xml @@ -77,9 +77,6 @@ configuration_save.addConfigurationItem("Portal Type Configurator Item",\n configuration_save.addConfigurationItem("Portal Type Configurator Item",\n target_portal_type=\'Inventory\',\n add_propertysheet_list=(\'InventoryConstraint\',))\n -\n -# These must be last\n -configuration_save.addConfigurationItem("Export Customer BT5 Configurator Item")\n </string> </value> </item> <item> diff --git a/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_displayDownload.xml b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_displayDownload.xml index 989f0b9fe9..b6823efe6d 100644 --- a/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_displayDownload.xml +++ b/bt5/erp5_configurator_standard/SkinTemplateItem/portal_skins/erp5_configurator_standard/BusinessConfiguration_displayDownload.xml @@ -115,9 +115,6 @@ configuration_save.addConfigurationItem("Portal Type Configurator Item",\n configuration_save.addConfigurationItem("Portal Type Configurator Item",\n target_portal_type=\'Sale Packing List Line\',\n add_propertysheet_list=(\'TradeOrderLine\',))\n -\n -# These must be last\n -configuration_save.addConfigurationItem("Export Customer BT5 Configurator Item")\n </string> </value> </item> <item> diff --git a/bt5/erp5_configurator_standard/bt/revision b/bt5/erp5_configurator_standard/bt/revision index 0c7f592376..a7ff3ab009 100644 --- a/bt5/erp5_configurator_standard/bt/revision +++ b/bt5/erp5_configurator_standard/bt/revision @@ -1 +1 @@ -604 \ No newline at end of file +605 \ No newline at end of file diff --git a/bt5/erp5_configurator_ung/SkinTemplateItem/portal_skins/erp5_configurator_ung/BusinessConfiguration_displayUNGDownload.xml b/bt5/erp5_configurator_ung/SkinTemplateItem/portal_skins/erp5_configurator_ung/BusinessConfiguration_displayUNGDownload.xml index 2244f5cbe9..b131f7836c 100644 --- a/bt5/erp5_configurator_ung/SkinTemplateItem/portal_skins/erp5_configurator_ung/BusinessConfiguration_displayUNGDownload.xml +++ b/bt5/erp5_configurator_ung/SkinTemplateItem/portal_skins/erp5_configurator_ung/BusinessConfiguration_displayUNGDownload.xml @@ -50,11 +50,10 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n -group_id = context.getGlobalConfigurationAttr(\'group_id\')\n -\n -# These must be last\n -configuration_save.addConfigurationItem("Export Customer BT5 Configurator Item")\n + <value> <string>"""\n + This script should be removed.\n +"""\n +pass\n </string> </value> </item> <item> diff --git a/bt5/erp5_configurator_ung/bt/revision b/bt5/erp5_configurator_ung/bt/revision index 2e66562e27..c5b431b6cb 100644 --- a/bt5/erp5_configurator_ung/bt/revision +++ b/bt5/erp5_configurator_ung/bt/revision @@ -1 +1 @@ -49 \ No newline at end of file +50 \ No newline at end of file diff --git a/product/ERP5Configurator/Document/ExportCustomerBT5ConfiguratorItem.py b/product/ERP5Configurator/Document/ExportCustomerBT5ConfiguratorItem.py deleted file mode 100644 index 1a585a298a..0000000000 --- a/product/ERP5Configurator/Document/ExportCustomerBT5ConfiguratorItem.py +++ /dev/null @@ -1,68 +0,0 @@ -############################################################################## -# -# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved. -# Ivan Tyagov <ivan@nexedi.com> -# -# 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. -# -############################################################################## - -import zope.interface -from AccessControl import ClassSecurityInfo -from Products.ERP5Type import Permissions, PropertySheet, interfaces -from Products.ERP5Type.XMLObject import XMLObject -from Products.ERP5Configurator.mixin.configurator_item import ConfiguratorItemMixin - -class ExportCustomerBT5ConfiguratorItem(XMLObject, ConfiguratorItemMixin): - """ Create a new bt5 for customer configuration. """ - - meta_type = 'ERP5 Export Customer BT5 Configurator Item' - portal_type = 'Export Customer BT5 Configurator Item' - add_permission = Permissions.AddPortalContent - isPortalContent = 1 - isRADContent = 1 - - # Declarative security - security = ClassSecurityInfo() - security.declareObjectProtected(Permissions.AccessContentsInformation) - - # Declarative interfaces - zope.interface.implements(interfaces.IConfiguratorItem) - - # Declarative properties - property_sheets = ( PropertySheet.Base - , PropertySheet.XMLObject - , PropertySheet.CategoryCore - , PropertySheet.DublinCore ) - - def _build(self, business_configuration): - template_tool = self.getPortalObject().portal_templates - bt5_obj = business_configuration.getSpecialiseValue() - if bt5_obj.getBuildingState() != 'built': - ## build template so it can be exported - bt5_obj.edit() - bt5_obj.build() - bt5_data = template_tool.export(bt5_obj) - business_configuration.newContent( - portal_type='File', - title=bt5_obj.getTitle(), - data=bt5_data) -- 2.30.9