diff --git a/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Manager/build.xml b/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Manager/build.xml index 88fb439ba11797c964f116ac7f9bc6b0bd6019b1..d3f11bf7d1c301ad127af1b6e891208f099ee910 100644 --- a/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Manager/build.xml +++ b/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Manager/build.xml @@ -60,7 +60,7 @@ </item> <item> <key> <string>title</string> </key> - <value> <string>Build</string> </value> + <value> <string>Build Business Manager</string> </value> </item> <item> <key> <string>visible</string> </key> diff --git a/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Manager/update_template_path_list.xml b/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Manager/update_template_path_list.xml new file mode 100644 index 0000000000000000000000000000000000000000..4de97bd3bc8e3ad9170058a1c03456b74a842f0e --- /dev/null +++ b/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Manager/update_template_path_list.xml @@ -0,0 +1,83 @@ +<?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_action</string> + </tuple> + </value> + </item> + <item> + <key> <string>category</string> </key> + <value> <string>object_action</string> </value> + </item> + <item> + <key> <string>condition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string>Forcefully update template_path_list for Business Manager object using objectValues of the manager.</string> </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>update_template_path_list</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Action Information</string> </value> + </item> + <item> + <key> <string>priority</string> </key> + <value> <float>5.0</float> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Force Update Template Path List</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}/BusinessManager_updateTemplatePathList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Property%20Item/content_view.xml b/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Property%20Item/content_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..ea4e317dbd1c3344a8259c5ab1b13740f31a9335 --- /dev/null +++ b/bt5/erp5_business_package/ActionTemplateItem/portal_types/Business%20Property%20Item/content_view.xml @@ -0,0 +1,85 @@ +<?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> + <none/> + </value> + </item> + <item> + <key> <string>icon</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>content_view</string> </value> + </item> + <item> + <key> <string>permissions</string> </key> + <value> + <tuple> + <string>View</string> + </tuple> + </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Action Information</string> </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}/BusinessPropertyItem_view</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view.xml index 67f8e7193fde90b515a371475e918f1d35f9fd36..b124283752465a4bf91a9d08412d24244b041ca2 100644 --- a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view.xml +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view.xml @@ -74,8 +74,8 @@ <key> <string>left</string> </key> <value> <list> - <string>my_path</string> - <string>my_sign</string> + <string>my_item_path</string> + <string>my_item_sign</string> </list> </value> </item> @@ -83,7 +83,7 @@ <key> <string>right</string> </key> <value> <list> - <string>my_layer</string> + <string>my_item_layer</string> </list> </value> </item> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/listbox.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/listbox.xml index e1507a9cb98a95ec552ee916736666d5c2208bbf..4e0ce5f1f50bc834e86d7d104227302738444413 100644 --- a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/listbox.xml +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/listbox.xml @@ -11,8 +11,6 @@ <value> <list> <string>columns</string> - <string>list_method</string> - <string>selection_name</string> <string>title</string> </list> </value> @@ -93,16 +91,6 @@ <key> <string>form_id</string> </key> <value> <string>Base_viewFieldLibrary</string> </value> </item> - <item> - <key> <string>list_method</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </value> - </item> - <item> - <key> <string>selection_name</string> </key> - <value> <string>business_item_view_selection</string> </value> - </item> <item> <key> <string>title</string> </key> <value> <string>Item Values</string> </value> @@ -113,17 +101,4 @@ </dictionary> </pickle> </record> - <record id="2" aka="AAAAAAAAAAI="> - <pickle> - <global name="Method" module="Products.Formulator.MethodField"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>method_name</string> </key> - <value> <string>contentValues</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_layer.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_item_layer.xml similarity index 98% rename from bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_layer.xml rename to bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_item_layer.xml index 598ab223c7ca6ee247040ff422aaeee87790d8a5..a0bbd13b5afb6b6d40f5d10c7d62e26b0dd7fd9d 100644 --- a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_layer.xml +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_item_layer.xml @@ -17,7 +17,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>my_layer</string> </value> + <value> <string>my_item_layer</string> </value> </item> <item> <key> <string>message_values</string> </key> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_path.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_item_path.xml similarity index 98% rename from bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_path.xml rename to bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_item_path.xml index 26216ddcd24077ed3e55d24d41e65c2f4449c8bd..2ee68d1357d5de8f8f0888a9bf47135a70f0af1e 100644 --- a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_path.xml +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_item_path.xml @@ -17,7 +17,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>my_path</string> </value> + <value> <string>my_item_path</string> </value> </item> <item> <key> <string>message_values</string> </key> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_sign.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_item_sign.xml similarity index 98% rename from bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_sign.xml rename to bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_item_sign.xml index c5acea2d7e59b28bc3f0e45ccbcfa8daabea0e53..a0110a43f750ad28558d6bdd8b42f8e1775e3855 100644 --- a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_sign.xml +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessItem_view/my_item_sign.xml @@ -17,7 +17,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>my_sign</string> </value> + <value> <string>my_item_sign</string> </value> </item> <item> <key> <string>message_values</string> </key> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_build.py b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_build.py index c3b8d74c66075caadbce90bee7811e5b27b54f27..d715e7c27b34b506374744a6eeede69260ba933e 100644 --- a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_build.py +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_build.py @@ -1,2 +1,6 @@ manager = context manager.build() + +p = context.getPortalObject() +return p.REQUEST.RESPONSE.redirect( + manager.absolute_url_path()) diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_updateTemplatePathList.py b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_updateTemplatePathList.py new file mode 100644 index 0000000000000000000000000000000000000000..d7834094ad5d677d0966ade7499873b91809793e --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_updateTemplatePathList.py @@ -0,0 +1,4 @@ +manager = context + +# Make a call to the function to update template_path_list +manager.createTemplatePathListFromItemList() diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_updateTemplatePathList.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_updateTemplatePathList.xml new file mode 100644 index 0000000000000000000000000000000000000000..ce9bfde735cbadb222367b07847c1f9d60e760ae --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_updateTemplatePathList.xml @@ -0,0 +1,62 @@ +<?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>_params</string> </key> + <value> <string>**kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>BusinessManager_updateTemplatePathList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_view/listbox.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_view/listbox.xml index 78dc21ae4ae120d976f1aa3353f287d28fb610d1..9c519f521c17023d7102b6a77a846c981010329c 100644 --- a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_view/listbox.xml +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_view/listbox.xml @@ -83,6 +83,10 @@ <string>item_layer</string> <string>layer</string> </tuple> + <tuple> + <string>portal_type</string> + <string>Portal Type</string> + </tuple> </list> </value> </item> @@ -126,7 +130,7 @@ <dictionary> <item> <key> <string>method_name</string> </key> - <value> <string>contentValues</string> </value> + <value> <string>objectValues</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_view/my_template_path_list.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_view/my_template_path_list.xml index 8b9ee74ae48e74f384ae4c708952812fcc524c9f..e87703a5dac20d2d1af085d26353286a0c9caf86 100644 --- a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_view/my_template_path_list.xml +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessManager_view/my_template_path_list.xml @@ -247,7 +247,7 @@ </item> <item> <key> <string>hidden</string> </key> - <value> <int>0</int> </value> + <value> <int>1</int> </value> </item> <item> <key> <string>max_length</string> </key> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..284377b59f02c9a71650ce032e332a13ef7da560 --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view.xml @@ -0,0 +1,137 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ERP5 Form" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>action</string> </key> + <value> <string>Base_edit</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>edit_order</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>enctype</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>group_list</string> </key> + <value> + <list> + <string>left</string> + <string>right</string> + <string>center</string> + <string>bottom</string> + <string>hidden</string> + </list> + </value> + </item> + <item> + <key> <string>groups</string> </key> + <value> + <dictionary> + <item> + <key> <string>bottom</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>center</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>hidden</string> </key> + <value> + <list/> + </value> + </item> + <item> + <key> <string>left</string> </key> + <value> + <list> + <string>my_item_path</string> + <string>my_item_sign</string> + <string>my_item_layer</string> + </list> + </value> + </item> + <item> + <key> <string>right</string> </key> + <value> + <list> + <string>my_item_property_name</string> + <string>my_item_property_type</string> + <string>my_item_property_value</string> + </list> + </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>BusinessPropertyItem_view</string> </value> + </item> + <item> + <key> <string>method</string> </key> + <value> <string>POST</string> </value> + </item> + <item> + <key> <string>name</string> </key> + <value> <string>BusinessItem_view</string> </value> + </item> + <item> + <key> <string>pt</string> </key> + <value> <string>form_view</string> </value> + </item> + <item> + <key> <string>row_length</string> </key> + <value> <int>4</int> </value> + </item> + <item> + <key> <string>stored_encoding</string> </key> + <value> <string>UTF-8</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Business Item Definition</string> </value> + </item> + <item> + <key> <string>unicode_mode</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>update_action</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>update_action_title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_layer.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_layer.xml new file mode 100644 index 0000000000000000000000000000000000000000..a0bbd13b5afb6b6d40f5d10c7d62e26b0dd7fd9d --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_layer.xml @@ -0,0 +1,112 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>default</string> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_item_layer</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Layer</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.getBusinessPathLayer()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_path.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_path.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ee68d1357d5de8f8f0888a9bf47135a70f0af1e --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_path.xml @@ -0,0 +1,112 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>default</string> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_item_path</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Path</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.getBusinessPath()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_property_name.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_property_name.xml new file mode 100644 index 0000000000000000000000000000000000000000..7563417eb41fb7e28e8ab152e8db9a50a51179c3 --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_property_name.xml @@ -0,0 +1,112 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>default</string> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_item_property_name</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Property Name</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.getBusinessItemPropertyName()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_property_type.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_property_type.xml new file mode 100644 index 0000000000000000000000000000000000000000..d38a20e8311996f27dc953fb1ff2f93a5734f928 --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_property_type.xml @@ -0,0 +1,112 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>default</string> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_item_property_type</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Property Type</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.getBusinessItemPropertyType()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_property_value.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_property_value.xml new file mode 100644 index 0000000000000000000000000000000000000000..bcb8c1bd3ea0f215bb83e9f1266fe0579f130305 --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_property_value.xml @@ -0,0 +1,112 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>default</string> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_item_property_value</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Property Value</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.getBusinessItemPropertyValue()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_sign.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_sign.xml new file mode 100644 index 0000000000000000000000000000000000000000..a0110a43f750ad28558d6bdd8b42f8e1775e3855 --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/BusinessPropertyItem_view/my_item_sign.xml @@ -0,0 +1,112 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>default</string> + <string>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_item_sign</string> </value> + </item> + <item> + <key> <string>message_values</string> </key> + <value> + <dictionary> + <item> + <key> <string>external_validator_failed</string> </key> + <value> <string>The input failed the external validator.</string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>overrides</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_string_field</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Sign</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="TALESMethod" module="Products.Formulator.TALESField"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_text</string> </key> + <value> <string>python: here.getBusinessPathSign()</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/TemplateTool_updateInstallationState.py b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/TemplateTool_updateInstallationState.py new file mode 100644 index 0000000000000000000000000000000000000000..62e855ff24ca30ba7c39e58fb0c3b68877838baf --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/TemplateTool_updateInstallationState.py @@ -0,0 +1,19 @@ +# Context *must* be portal_templates +portal_templates = context +p = context.getPortalObject() + +# Get the selected Business Managers for installation +selection_name = 'business_manager_selection' +selected_uid_list = p.portal_selections.getSelectionCheckedUidsFor(selection_name) + +# Business Managers to be installed +manager_list = [] +for uid in selected_uid_list: + manager_list.append(p.portal_catalog.getObject(uid)) + +# Install Multiple Business Managers all together +portal_templates.updateInstallationState(manager_list) + +return p.REQUEST.RESPONSE.redirect( + portal_templates.absolute_url_path() + + '?portal_status_message=Successfull Installation of Business Managers') diff --git a/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/TemplateTool_updateInstallationState.xml b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/TemplateTool_updateInstallationState.xml new file mode 100644 index 0000000000000000000000000000000000000000..ca10f01c30b2db735abf6f98ba69b8c463be88c0 --- /dev/null +++ b/bt5/erp5_business_package/SkinTemplateItem/portal_skins/erp5_business_package/TemplateTool_updateInstallationState.xml @@ -0,0 +1,62 @@ +<?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>_params</string> </key> + <value> <string>**kw</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>TemplateTool_updateInstallationState</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.py b/bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.py index ef5a7c3db36ec6d12072df09903a19db5268bf56..cc37402b3cafd09db6e719e589495cb341754c40 100644 --- a/bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.py +++ b/bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.py @@ -899,7 +899,7 @@ class TestBusinessPackage(ERP5TypeTestCase): Case X: A A A : A """ - portal_templates = self.portal.portal_templates + portal_templates = self.portal.portal_templatesd managerA = self._createBusinessManager() test_folder = self._addFolderInERP5() test_folder.setProperty('short_title', 'foo') @@ -1293,22 +1293,71 @@ class TestBusinessPackage(ERP5TypeTestCase): self.assertTrue('Trying to remove changes at ZODB at test_folder#short_title' in context.exception) + def test_brokenModuleOnImport(self): + """ + Reproduce the broken object error in case of exporting and importing a + module object with the base type on which it depends on in the same Business + Manager + """ + import transaction + + base_type = self.portal.portal_types.newContent( + id='type_%s' % time.time(), + portal_type='Base Type', + type_class='Folder', + ) + + self.tic() + test_module = self.portal.newContent( + id='module_%s' % time.time(), + portal_type=base_type.id) + + + manager = self._createBusinessManager() + portal_templates = self.portal.portal_templates + + path_item_list = [ + 'portal_types/%s | 1 | 1' % base_type.id, + '%s | 1 | 1' % test_module.id, + ] + + manager.setProperty('template_path_list', path_item_list) + manager.build() + self.tic() + # Export the manager + manager.export('/srv/slapgrid/slappart16/srv/runner/instance/slappart6/tmp') + + self.portal.manage_delObjects(['%s' % test_module.id]) + self.portal.portal_types.manage_delObjects(['%s' % base_type.id]) + + portal_templates._delOb(manager.id) + + transaction.commit() + + import pdb; pdb.set_trace() + + # Import the Business Manager + imported_manager = portal_templates._importObjectFromFile('/srv/slapgrid/slappart16/srv/runner/instance/slappart6/tmp/%s.zexp' % manager.id) + + self.tic() + def test_migrateCatalogBTToBM(self): """ Try to export-import-install erp5_mysql_innodb_catalog BT to BM. This would help to keep track of the erp5_catalog which we use. """ + manager_A = self._createBusinessManager() portal_templates = self.portal.portal_templates - managerA = self._createBusinessManager(title='erp5_performance_test') - path_list = ['portal_skins/erp5_core_proxy_field_legacy | 1 | 1'] - # Set catalog path item as path_item in managerA - managerA.setProperty('template_path_list', path_list) - # Copy the Business Manager object - managerA_new, = self._copyBusinessManager([managerA.id,]) - managerA_new.build() - path = self._exportBusinessManager(managerA_new) - imported_manager = self._importBusinessManager(managerA_new, path, 1) + path_item_list = [ + 'person_module | 1 | 1', + ] + + manager_A.setProperty('template_path_list' ,path_item_list) + + self.tic() + + portal_templates.migrateBTToBM('/srv/slapgrid/slappart16/srv/runner/software/43d62734835a4a6fe6c005cf13c62653/parts/erp5/product/ERP5/bootstrap/erp5_core') def _globalInstallationOfBusinessTemplate(self): """ diff --git a/bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.xml b/bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.xml index 776e50956deccb3e8ee9505497797594508c83ff..9ce9f73173e5f9192fbc166c28194ddd3f14c970 100644 --- a/bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.xml +++ b/bt5/erp5_business_package/TestTemplateItem/portal_components/test.erp5.testBusinessPackage.xml @@ -102,11 +102,9 @@ <string>W:1237, 4: Possible unbalanced tuple unpacking with sequence defined at line 142: left side has 1 label(s), right side has 0 value(s) (unbalanced-tuple-unpacking)</string> <string>W:1269, 4: Possible unbalanced tuple unpacking with sequence defined at line 142: left side has 1 label(s), right side has 0 value(s) (unbalanced-tuple-unpacking)</string> <string>W:1284, 4: Possible unbalanced tuple unpacking with sequence defined at line 142: left side has 1 label(s), right side has 0 value(s) (unbalanced-tuple-unpacking)</string> - <string>W:1308, 4: Possible unbalanced tuple unpacking with sequence defined at line 142: left side has 1 label(s), right side has 0 value(s) (unbalanced-tuple-unpacking)</string> - <string>W:1311, 4: Unused variable \'imported_manager\' (unused-variable)</string> - <string>W:1301, 4: Unused variable \'portal_templates\' (unused-variable)</string> - <string>W:1346, 4: Possible unbalanced tuple unpacking with sequence defined at line 142: left side has 2 label(s), right side has 0 value(s) (unbalanced-tuple-unpacking)</string> - <string>W:1385, 4: Possible unbalanced tuple unpacking with sequence defined at line 142: left side has 2 label(s), right side has 0 value(s) (unbalanced-tuple-unpacking)</string> + <string>W:1340, 4: Unused variable \'imported_manager\' (unused-variable)</string> + <string>W:1395, 4: Possible unbalanced tuple unpacking with sequence defined at line 142: left side has 2 label(s), right side has 0 value(s) (unbalanced-tuple-unpacking)</string> + <string>W:1434, 4: Possible unbalanced tuple unpacking with sequence defined at line 142: left side has 2 label(s), right side has 0 value(s) (unbalanced-tuple-unpacking)</string> </tuple> </value> </item> diff --git a/bt5/erp5_business_package/bt/template_action_path_list b/bt5/erp5_business_package/bt/template_action_path_list index 152f07882cfd8d9e8d59b74ea120cb46b84cae21..c2331e35d44a9bf73a9015a7944f8ebbe88368e0 100644 --- a/bt5/erp5_business_package/bt/template_action_path_list +++ b/bt5/erp5_business_package/bt/template_action_path_list @@ -1,5 +1,7 @@ Business Item | content_view Business Manager | build Business Manager | content_view +Business Manager | update_template_path_list Business Package | content_view -Business Package | export \ No newline at end of file +Business Package | export +Business Property Item | content_view \ No newline at end of file