From a53c1f25fd97c3f679d5c0aae8b50af8c42be107 Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine <arnaud.fontaine@nexedi.com> Date: Wed, 18 Jan 2012 19:59:09 +0900 Subject: [PATCH] * Complete ComponentTool view. * Implement Extension Component. * Complete ExtensionComponent view. * Add component_interaction_workflow to reset erp5.component when modifying an Extension Component. --- .../portal_types/Component%20Tool/view.xml | 2 +- .../Extension%20Component/view.xml | 2 +- .../workflow_chain_type.xml | 4 + .../ToolTemplateItem/portal_components.xml | 32 +----- .../component_interaction_workflow.xml | 46 +++++++++ .../interactions.xml | 28 ++++++ .../interactions/ComponentTool_reset.xml | 97 ++++++++++++++++++ .../interactions/Component_reset.xml | 98 +++++++++++++++++++ .../scripts.xml | 28 ++++++ .../scripts/reset.xml | 75 ++++++++++++++ .../variables.xml | 22 +++++ .../worklists.xml | 22 +++++ .../ERP5/bootstrap/erp5_core/bt/change_log | 6 ++ product/ERP5/bootstrap/erp5_core/bt/revision | 2 +- .../template_portal_type_workflow_chain_list | 3 + .../erp5_core/bt/template_workflow_id_list | 1 + 16 files changed, 434 insertions(+), 34 deletions(-) create mode 100644 product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow.xml create mode 100644 product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions.xml create mode 100644 product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions/ComponentTool_reset.xml create mode 100644 product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions/Component_reset.xml create mode 100644 product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/scripts.xml create mode 100644 product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/scripts/reset.xml create mode 100644 product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/variables.xml create mode 100644 product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/worklists.xml diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Component%20Tool/view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Component%20Tool/view.xml index 7affec390a..e732730691 100644 --- a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Component%20Tool/view.xml +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Component%20Tool/view.xml @@ -73,7 +73,7 @@ <dictionary> <item> <key> <string>text</string> </key> - <value> <string>string:${object_url}/ComponentTool_viewComponentValueList</string> </value> + <value> <string>string:${object_url}/ComponentTool_viewContentList</string> </value> </item> </dictionary> </pickle> diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/view.xml index 798a3b3b31..8f4a0c3afc 100644 --- a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/view.xml +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/view.xml @@ -75,7 +75,7 @@ <dictionary> <item> <key> <string>text</string> </key> - <value> <string>string:${object_url}/DocumentComponent_view</string> </value> + <value> <string>string:${object_url}/Component_view</string> </value> </item> </dictionary> </pickle> diff --git a/product/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml b/product/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml index ca2bd886b2..048d6a31df 100644 --- a/product/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml +++ b/product/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml @@ -91,6 +91,10 @@ <type>Dynamic Category Property</type> <workflow>dynamic_class_generation_interaction_workflow</workflow> </chain> + <chain> + <type>Extension Component</type> + <workflow>component_interaction_workflow, edit_workflow, validation_workflow</workflow> + </chain> <chain> <type>Mapped Value</type> <workflow>edit_workflow</workflow> diff --git a/product/ERP5/bootstrap/erp5_core/ToolTemplateItem/portal_components.xml b/product/ERP5/bootstrap/erp5_core/ToolTemplateItem/portal_components.xml index 62296c363e..7b9c0a5ec1 100644 --- a/product/ERP5/bootstrap/erp5_core/ToolTemplateItem/portal_components.xml +++ b/product/ERP5/bootstrap/erp5_core/ToolTemplateItem/portal_components.xml @@ -34,10 +34,6 @@ <key> <string>id</string> </key> <value> <string>portal_components</string> </value> </item> - <item> - <key> <string>last_id</string> </key> - <value> <string>4</string> </value> - </item> <item> <key> <string>title</string> </key> <value> <string>Components</string> </value> @@ -56,16 +52,7 @@ <global name="OOBTree" module="BTrees.OOBTree"/> </pickle> <pickle> - <tuple> - <tuple> - <tuple> - <tuple> - <string>ERP5 Document Component</string> - <persistent> <string encoding="base64">AAAAAAAAAAU=</string> </persistent> - </tuple> - </tuple> - </tuple> - </tuple> + <none/> </pickle> </record> <record id="4" aka="AAAAAAAAAAQ="> @@ -76,21 +63,4 @@ <none/> </pickle> </record> - <record id="5" aka="AAAAAAAAAAU="> - <pickle> - <global name="OIBTree" module="BTrees.OIBTree"/> - </pickle> - <pickle> - <tuple> - <tuple> - <tuple> - <tuple> - <string>erp5.interface.test_document</string> - <int>1</int> - </tuple> - </tuple> - </tuple> - </tuple> - </pickle> - </record> </ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow.xml new file mode 100644 index 0000000000..c88bfa23e8 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow.xml @@ -0,0 +1,46 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="InteractionWorkflowDefinition" module="Products.ERP5.InteractionWorkflow"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>creation_guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>component_interaction_workflow</string> </value> + </item> + <item> + <key> <string>manager_bypass</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Component Interaction Workflow</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions.xml new file mode 100644 index 0000000000..e18bf8cbf7 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Interaction" module="Products.ERP5.Interaction"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>interactions</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions/ComponentTool_reset.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions/ComponentTool_reset.xml new file mode 100644 index 0000000000..3e783f502e --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions/ComponentTool_reset.xml @@ -0,0 +1,97 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="InteractionDefinition" module="Products.ERP5.Interaction"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>actbox_category</string> </key> + <value> <string>workflow</string> </value> + </item> + <item> + <key> <string>actbox_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>actbox_url</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>activate_script_name</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>after_script_name</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>before_commit_script_name</string> </key> + <value> + <list> + <string>reset</string> + </list> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ComponentTool_reset</string> </value> + </item> + <item> + <key> <string>method_id</string> </key> + <value> + <list> + <string>_delObject</string> + <string>_setObject</string> + </list> + </value> + </item> + <item> + <key> <string>once_per_transaction</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>portal_type_filter</string> </key> + <value> + <list> + <string>Component Tool</string> + </list> + </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>temporary_document_disallowed</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>2</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions/Component_reset.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions/Component_reset.xml new file mode 100644 index 0000000000..81848bfde9 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/interactions/Component_reset.xml @@ -0,0 +1,98 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="InteractionDefinition" module="Products.ERP5.Interaction"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>actbox_category</string> </key> + <value> <string>workflow</string> </value> + </item> + <item> + <key> <string>actbox_name</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>actbox_url</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>activate_script_name</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>after_script_name</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>before_commit_script_name</string> </key> + <value> + <list> + <string>reset</string> + </list> + </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>guard</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>Component_reset</string> </value> + </item> + <item> + <key> <string>method_id</string> </key> + <value> + <list> + <string>_set*</string> + <string>validate</string> + <string>invalidate</string> + </list> + </value> + </item> + <item> + <key> <string>once_per_transaction</string> </key> + <value> <int>1</int> </value> + </item> + <item> + <key> <string>portal_type_filter</string> </key> + <value> + <list> + <string>Extension Component</string> + </list> + </value> + </item> + <item> + <key> <string>script_name</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>temporary_document_disallowed</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>trigger_type</string> </key> + <value> <int>2</int> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/scripts.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/scripts.xml new file mode 100644 index 0000000000..072c8f6540 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/scripts.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Scripts" module="Products.DCWorkflow.Scripts"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>scripts</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/scripts/reset.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/scripts/reset.xml new file mode 100644 index 0000000000..2817bc17d9 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/scripts/reset.xml @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_body</string> </key> + <value> <string>state_change[\'object\'].reset()\n +</string> </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>state_change</string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>reset</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/variables.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/variables.xml new file mode 100644 index 0000000000..6ae03699d1 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/variables.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Variables" module="Products.DCWorkflow.Variables"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>variables</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/worklists.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/worklists.xml new file mode 100644 index 0000000000..c3432aa051 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/component_interaction_workflow/worklists.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Worklists" module="Products.DCWorkflow.Worklists"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_mapping</string> </key> + <value> + <dictionary/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>worklists</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log index 57f29a07b2..601d29024b 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/change_log +++ b/product/ERP5/bootstrap/erp5_core/bt/change_log @@ -1,3 +1,9 @@ +2012-01-18 arnaud.fontaine +* Complete ComponentTool view. +* Implement Extension Component. +* Complete ExtensionComponent view. +* Add component_interaction_workflow to reset erp5.component when modifying the source code of an Extension Component. + 2012-12-20 arnaud.fontaine * Add initial ZODB component prototype. diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 67c2a132aa..edb471677f 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -40989 \ No newline at end of file +40990 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list b/product/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list index 549c0c225a..887dd2b073 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list +++ b/product/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list @@ -25,6 +25,9 @@ Document | edit_workflow Document Component | edit_workflow Document Component | validation_workflow Dynamic Category Property | dynamic_class_generation_interaction_workflow +Extension Component | component_interaction_workflow +Extension Component | edit_workflow +Extension Component | validation_workflow Mapped Value | edit_workflow Memcached Plugin | memcached_plugin_interaction_workflow Predicate | rule_interaction_workflow diff --git a/product/ERP5/bootstrap/erp5_core/bt/template_workflow_id_list b/product/ERP5/bootstrap/erp5_core/bt/template_workflow_id_list index 7e8b6158f3..70ca2f7ff1 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/template_workflow_id_list +++ b/product/ERP5/bootstrap/erp5_core/bt/template_workflow_id_list @@ -2,6 +2,7 @@ base_type_interaction_workflow business_template_building_workflow business_template_installation_workflow distributed_ram_cache_interaction_workflow +component_interaction_workflow dynamic_class_generation_interaction_workflow edit_workflow memcached_plugin_interaction_workflow -- 2.30.9