From 01d4b3948434d1f4f53f3cfbf54622e34161544a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 18 Jul 2006 14:11:50 +0000 Subject: [PATCH] Initial checkin of a BT containing dummy content for easier unit testing git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8493 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../DocumentTemplateItem/DummyMovement.py | 72 +++++++++++ .../portal_types/Dummy%20Movement.xml | 114 ++++++++++++++++++ bt5/erp5_dummy_movement/bt/categories_list | 0 bt5/erp5_dummy_movement/bt/change_log | 2 + bt5/erp5_dummy_movement/bt/copyright_list | 0 bt5/erp5_dummy_movement/bt/dependency_list | 1 + bt5/erp5_dummy_movement/bt/description | 1 + bt5/erp5_dummy_movement/bt/license | 1 + bt5/erp5_dummy_movement/bt/maintainer_list | 1 + bt5/erp5_dummy_movement/bt/publication_url | 1 + bt5/erp5_dummy_movement/bt/revision | 1 + .../bt/template_action_path_list | 0 .../bt/template_base_category_list | 0 .../bt/template_catalog_full_text_key_list | 0 .../bt/template_catalog_keyword_key_list | 0 .../bt/template_catalog_method_id_list | 0 .../bt/template_catalog_multivalue_key_list | 0 .../bt/template_catalog_related_key_list | 0 .../bt/template_catalog_request_key_list | 0 .../bt/template_catalog_result_key_list | 0 .../bt/template_catalog_result_table_list | 0 .../bt/template_catalog_topic_key_list | 0 .../bt/template_constraint_id_list | 0 .../bt/template_document_id_list | 1 + .../bt/template_extension_id_list | 0 .../bt/template_format_version | 1 + .../bt/template_local_roles_list | 0 .../bt/template_message_translation_list | 0 .../bt/template_module_id_list | 0 bt5/erp5_dummy_movement/bt/template_path_list | 0 ...late_portal_type_allowed_content_type_list | 0 .../template_portal_type_base_category_list | 0 ...plate_portal_type_hidden_content_type_list | 0 .../bt/template_portal_type_id_list | 1 + .../template_portal_type_property_sheet_list | 0 .../bt/template_portal_type_roles_list | 0 .../template_portal_type_workflow_chain_list | 0 .../bt/template_product_id_list | 0 .../bt/template_property_sheet_id_list | 0 bt5/erp5_dummy_movement/bt/template_role_list | 0 .../bt/template_site_property_id_list | 0 .../bt/template_skin_id_list | 0 .../bt/template_test_id_list | 0 ...template_update_business_template_workflow | 1 + .../bt/template_update_tool | 1 + .../bt/template_workflow_id_list | 0 bt5/erp5_dummy_movement/bt/title | 1 + bt5/erp5_dummy_movement/bt/version | 1 + 48 files changed, 201 insertions(+) create mode 100644 bt5/erp5_dummy_movement/DocumentTemplateItem/DummyMovement.py create mode 100644 bt5/erp5_dummy_movement/PortalTypeTemplateItem/portal_types/Dummy%20Movement.xml create mode 100644 bt5/erp5_dummy_movement/bt/categories_list create mode 100644 bt5/erp5_dummy_movement/bt/change_log create mode 100644 bt5/erp5_dummy_movement/bt/copyright_list create mode 100644 bt5/erp5_dummy_movement/bt/dependency_list create mode 100644 bt5/erp5_dummy_movement/bt/description create mode 100644 bt5/erp5_dummy_movement/bt/license create mode 100644 bt5/erp5_dummy_movement/bt/maintainer_list create mode 100644 bt5/erp5_dummy_movement/bt/publication_url create mode 100644 bt5/erp5_dummy_movement/bt/revision create mode 100644 bt5/erp5_dummy_movement/bt/template_action_path_list create mode 100644 bt5/erp5_dummy_movement/bt/template_base_category_list create mode 100644 bt5/erp5_dummy_movement/bt/template_catalog_full_text_key_list create mode 100644 bt5/erp5_dummy_movement/bt/template_catalog_keyword_key_list create mode 100644 bt5/erp5_dummy_movement/bt/template_catalog_method_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_catalog_multivalue_key_list create mode 100644 bt5/erp5_dummy_movement/bt/template_catalog_related_key_list create mode 100644 bt5/erp5_dummy_movement/bt/template_catalog_request_key_list create mode 100644 bt5/erp5_dummy_movement/bt/template_catalog_result_key_list create mode 100644 bt5/erp5_dummy_movement/bt/template_catalog_result_table_list create mode 100644 bt5/erp5_dummy_movement/bt/template_catalog_topic_key_list create mode 100644 bt5/erp5_dummy_movement/bt/template_constraint_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_document_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_extension_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_format_version create mode 100644 bt5/erp5_dummy_movement/bt/template_local_roles_list create mode 100644 bt5/erp5_dummy_movement/bt/template_message_translation_list create mode 100644 bt5/erp5_dummy_movement/bt/template_module_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_path_list create mode 100644 bt5/erp5_dummy_movement/bt/template_portal_type_allowed_content_type_list create mode 100644 bt5/erp5_dummy_movement/bt/template_portal_type_base_category_list create mode 100644 bt5/erp5_dummy_movement/bt/template_portal_type_hidden_content_type_list create mode 100644 bt5/erp5_dummy_movement/bt/template_portal_type_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_portal_type_property_sheet_list create mode 100644 bt5/erp5_dummy_movement/bt/template_portal_type_roles_list create mode 100644 bt5/erp5_dummy_movement/bt/template_portal_type_workflow_chain_list create mode 100644 bt5/erp5_dummy_movement/bt/template_product_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_property_sheet_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_role_list create mode 100644 bt5/erp5_dummy_movement/bt/template_site_property_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_skin_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_test_id_list create mode 100644 bt5/erp5_dummy_movement/bt/template_update_business_template_workflow create mode 100644 bt5/erp5_dummy_movement/bt/template_update_tool create mode 100644 bt5/erp5_dummy_movement/bt/template_workflow_id_list create mode 100644 bt5/erp5_dummy_movement/bt/title create mode 100644 bt5/erp5_dummy_movement/bt/version diff --git a/bt5/erp5_dummy_movement/DocumentTemplateItem/DummyMovement.py b/bt5/erp5_dummy_movement/DocumentTemplateItem/DummyMovement.py new file mode 100644 index 0000000000..b08bf56893 --- /dev/null +++ b/bt5/erp5_dummy_movement/DocumentTemplateItem/DummyMovement.py @@ -0,0 +1,72 @@ +############################################################################## +# +# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved. +# Jerome Perrin <jerome@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. +# +############################################################################## +from AccessControl import ClassSecurityInfo +from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface + +from Products.ERP5.Document.Movement import Movement + +from zLOG import LOG + +class DummyMovement(Movement): + """Dummy Movement for testing purposes.""" + meta_type = 'ERP5 Movement' + portal_type = 'Movement' + add_permission = Permissions.AddPortalContent + isPortalContent = 1 + isRADContent = 1 + isMovement = 1 + + # Declarative security + security = ClassSecurityInfo() + security.declareObjectProtected(Permissions.AccessContentsInformation) + + # Declarative interfaces + __implements__ = ( Interface.Variated, ) + + # Declarative properties + property_sheets = ( PropertySheet.Base + , PropertySheet.SimpleItem + , PropertySheet.Amount + , PropertySheet.Task + , PropertySheet.Arrow + , PropertySheet.Movement + , PropertySheet.Price + ) + + def getSimulationState(self): + """Directly returns a simulation state.""" + return getattr(self, 'simulation_state', 'draft') + + def setSimulationState(self, state): + """Directly sets a simulation state.""" + self.simulation_state = state + + def isAccountable(self): + """Our dummy movement are always accountable.""" + return getattr(self, 'is_accountable', 1) + diff --git a/bt5/erp5_dummy_movement/PortalTypeTemplateItem/portal_types/Dummy%20Movement.xml b/bt5/erp5_dummy_movement/PortalTypeTemplateItem/portal_types/Dummy%20Movement.xml new file mode 100644 index 0000000000..92ecad4af2 --- /dev/null +++ b/bt5/erp5_dummy_movement/PortalTypeTemplateItem/portal_types/Dummy%20Movement.xml @@ -0,0 +1,114 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <tuple> + <string>Products.ERP5Type.ERP5Type</string> + <string>ERP5TypeInformation</string> + </tuple> + <none/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__ac_local_roles__</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_actions</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>_aliases</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_roles</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>acquire_local_roles</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>allowed_content_types</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>base_category_list</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>content_icon</string> </key> + <value> <string>folder_icon.gif</string> </value> + </item> + <item> + <key> <string>content_meta_type</string> </key> + <value> <string>ERP5 Dummy Movement</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Dummy Movement for testing</string> </value> + </item> + <item> + <key> <string>factory</string> </key> + <value> <string>addDummyMovement</string> </value> + </item> + <item> + <key> <string>filter_content_types</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>group_list</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>hidden_content_type_list</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Dummy Movement</string> </value> + </item> + <item> + <key> <string>init_script</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>property_sheet_list</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_dummy_movement/bt/categories_list b/bt5/erp5_dummy_movement/bt/categories_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/change_log b/bt5/erp5_dummy_movement/bt/change_log new file mode 100644 index 0000000000..5342c52f79 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/change_log @@ -0,0 +1,2 @@ +2006-07-18 jerome +* inital checkin \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/copyright_list b/bt5/erp5_dummy_movement/bt/copyright_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/dependency_list b/bt5/erp5_dummy_movement/bt/dependency_list new file mode 100644 index 0000000000..d0ca7aef23 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/dependency_list @@ -0,0 +1 @@ +erp5_core \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/description b/bt5/erp5_dummy_movement/bt/description new file mode 100644 index 0000000000..d52ee5f648 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/description @@ -0,0 +1 @@ +Business Template with dummy Movement class and the corresponding portal type. Usefull for testing. \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/license b/bt5/erp5_dummy_movement/bt/license new file mode 100644 index 0000000000..3a3e12bcad --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/license @@ -0,0 +1 @@ +GPL \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/maintainer_list b/bt5/erp5_dummy_movement/bt/maintainer_list new file mode 100644 index 0000000000..cc1eb1784b --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/maintainer_list @@ -0,0 +1 @@ +jerome \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/publication_url b/bt5/erp5_dummy_movement/bt/publication_url new file mode 100644 index 0000000000..4af18322e3 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/publication_url @@ -0,0 +1 @@ +None \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/revision b/bt5/erp5_dummy_movement/bt/revision new file mode 100644 index 0000000000..56a6051ca2 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/revision @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/template_action_path_list b/bt5/erp5_dummy_movement/bt/template_action_path_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_base_category_list b/bt5/erp5_dummy_movement/bt/template_base_category_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_catalog_full_text_key_list b/bt5/erp5_dummy_movement/bt/template_catalog_full_text_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_catalog_keyword_key_list b/bt5/erp5_dummy_movement/bt/template_catalog_keyword_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_catalog_method_id_list b/bt5/erp5_dummy_movement/bt/template_catalog_method_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_catalog_multivalue_key_list b/bt5/erp5_dummy_movement/bt/template_catalog_multivalue_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_catalog_related_key_list b/bt5/erp5_dummy_movement/bt/template_catalog_related_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_catalog_request_key_list b/bt5/erp5_dummy_movement/bt/template_catalog_request_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_catalog_result_key_list b/bt5/erp5_dummy_movement/bt/template_catalog_result_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_catalog_result_table_list b/bt5/erp5_dummy_movement/bt/template_catalog_result_table_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_catalog_topic_key_list b/bt5/erp5_dummy_movement/bt/template_catalog_topic_key_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_constraint_id_list b/bt5/erp5_dummy_movement/bt/template_constraint_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_document_id_list b/bt5/erp5_dummy_movement/bt/template_document_id_list new file mode 100644 index 0000000000..3dce28b27e --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/template_document_id_list @@ -0,0 +1 @@ +DummyMovement \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/template_extension_id_list b/bt5/erp5_dummy_movement/bt/template_extension_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_format_version b/bt5/erp5_dummy_movement/bt/template_format_version new file mode 100644 index 0000000000..56a6051ca2 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/template_format_version @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/template_local_roles_list b/bt5/erp5_dummy_movement/bt/template_local_roles_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_message_translation_list b/bt5/erp5_dummy_movement/bt/template_message_translation_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_module_id_list b/bt5/erp5_dummy_movement/bt/template_module_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_path_list b/bt5/erp5_dummy_movement/bt/template_path_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_portal_type_allowed_content_type_list b/bt5/erp5_dummy_movement/bt/template_portal_type_allowed_content_type_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_portal_type_base_category_list b/bt5/erp5_dummy_movement/bt/template_portal_type_base_category_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_portal_type_hidden_content_type_list b/bt5/erp5_dummy_movement/bt/template_portal_type_hidden_content_type_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_portal_type_id_list b/bt5/erp5_dummy_movement/bt/template_portal_type_id_list new file mode 100644 index 0000000000..85b133cc43 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/template_portal_type_id_list @@ -0,0 +1 @@ +Dummy Movement \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/template_portal_type_property_sheet_list b/bt5/erp5_dummy_movement/bt/template_portal_type_property_sheet_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_portal_type_roles_list b/bt5/erp5_dummy_movement/bt/template_portal_type_roles_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_portal_type_workflow_chain_list b/bt5/erp5_dummy_movement/bt/template_portal_type_workflow_chain_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_product_id_list b/bt5/erp5_dummy_movement/bt/template_product_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_property_sheet_id_list b/bt5/erp5_dummy_movement/bt/template_property_sheet_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_role_list b/bt5/erp5_dummy_movement/bt/template_role_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_site_property_id_list b/bt5/erp5_dummy_movement/bt/template_site_property_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_skin_id_list b/bt5/erp5_dummy_movement/bt/template_skin_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_test_id_list b/bt5/erp5_dummy_movement/bt/template_test_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/template_update_business_template_workflow b/bt5/erp5_dummy_movement/bt/template_update_business_template_workflow new file mode 100644 index 0000000000..c227083464 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/template_update_business_template_workflow @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/template_update_tool b/bt5/erp5_dummy_movement/bt/template_update_tool new file mode 100644 index 0000000000..c227083464 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/template_update_tool @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/template_workflow_id_list b/bt5/erp5_dummy_movement/bt/template_workflow_id_list new file mode 100644 index 0000000000..e69de29bb2 diff --git a/bt5/erp5_dummy_movement/bt/title b/bt5/erp5_dummy_movement/bt/title new file mode 100644 index 0000000000..e6eec4dbd0 --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/title @@ -0,0 +1 @@ +erp5_dummy_movement \ No newline at end of file diff --git a/bt5/erp5_dummy_movement/bt/version b/bt5/erp5_dummy_movement/bt/version new file mode 100644 index 0000000000..ceab6e11ec --- /dev/null +++ b/bt5/erp5_dummy_movement/bt/version @@ -0,0 +1 @@ +0.1 \ No newline at end of file -- 2.30.9