From 3ddabfd21809b282c0c17cf46e02be8be2d4dd83 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Fri, 8 Feb 2013 13:31:26 +0100 Subject: [PATCH] Computer should support region category. --- .../ComputerModel_view.xml | 1 + .../ComputerModel_view/my_region.xml | 96 +++++++++++++++++++ .../Computer_applyComputerModel.xml | 1 + .../Computer_viewModel.xml | 1 + .../Computer_viewModel/my_region.xml | 96 +++++++++++++++++++ .../testERP5ComputerWithComputerModel.py | 1 + bt5/erp5_computer_immobilisation/bt/revision | 2 +- .../Computer/region_category.xml | 20 ++++ .../erp5_property_sheets/bt/revision | 2 +- 9 files changed, 218 insertions(+), 2 deletions(-) create mode 100644 bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/ComputerModel_view/my_region.xml create mode 100644 bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_viewModel/my_region.xml create mode 100644 product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Computer/region_category.xml diff --git a/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/ComputerModel_view.xml b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/ComputerModel_view.xml index 46ee25a496..52b3e69c73 100644 --- a/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/ComputerModel_view.xml +++ b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/ComputerModel_view.xml @@ -111,6 +111,7 @@ <key> <string>right</string> </key> <value> <list> + <string>my_region</string> <string>my_storage_capacity</string> <string>my_storage_interface</string> <string>my_storage_redundancy</string> diff --git a/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/ComputerModel_view/my_region.xml b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/ComputerModel_view/my_region.xml new file mode 100644 index 0000000000..c154708c1f --- /dev/null +++ b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/ComputerModel_view/my_region.xml @@ -0,0 +1,96 @@ +<?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>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_region</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> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</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> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_category</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Region</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_applyComputerModel.xml b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_applyComputerModel.xml index fc28e0ee76..e01386e3b8 100644 --- a/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_applyComputerModel.xml +++ b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_applyComputerModel.xml @@ -71,6 +71,7 @@ else :\n \'memory_size\',\n \'memory_type\',\n \'role\',\n + \'region\',\n \'storage_capacity\',\n \'storage_interface\',\n \'storage_redundancy\',\n diff --git a/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_viewModel.xml b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_viewModel.xml index 4bf18526b7..cc2b52e105 100644 --- a/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_viewModel.xml +++ b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_viewModel.xml @@ -110,6 +110,7 @@ <key> <string>right</string> </key> <value> <list> + <string>my_region</string> <string>my_storage_capacity</string> <string>my_storage_interface</string> <string>my_storage_redundancy</string> diff --git a/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_viewModel/my_region.xml b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_viewModel/my_region.xml new file mode 100644 index 0000000000..c154708c1f --- /dev/null +++ b/bt5/erp5_computer_immobilisation/SkinTemplateItem/portal_skins/erp5_computer_immobilisation/Computer_viewModel/my_region.xml @@ -0,0 +1,96 @@ +<?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>title</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_region</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> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>tales</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> + <item> + <key> <string>target</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </value> + </item> + <item> + <key> <string>values</string> </key> + <value> + <dictionary> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_category</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string>Region</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_computer_immobilisation/TestTemplateItem/testERP5ComputerWithComputerModel.py b/bt5/erp5_computer_immobilisation/TestTemplateItem/testERP5ComputerWithComputerModel.py index fb3c48a86a..c49a65c11c 100644 --- a/bt5/erp5_computer_immobilisation/TestTemplateItem/testERP5ComputerWithComputerModel.py +++ b/bt5/erp5_computer_immobilisation/TestTemplateItem/testERP5ComputerWithComputerModel.py @@ -112,6 +112,7 @@ class TestERP5ComputerWithComputerModel(ERP5TypeTestCase): 'local_area_network_type2'], 'memory_size': ['memory_size1', 'memory_size2'], 'memory_type': ['memory_type1', 'memory_type2'], + 'region': ['region1', 'region2'], 'storage_capacity': ['storage_capacity1', 'storage_capacity2'], 'storage_interface': ['storage_interface1', 'storage_interface2'], 'storage_redundancy': ['storage_redundancy1', 'storage_redundancy2'], diff --git a/bt5/erp5_computer_immobilisation/bt/revision b/bt5/erp5_computer_immobilisation/bt/revision index 4800c7da68..fc9afb48e0 100644 --- a/bt5/erp5_computer_immobilisation/bt/revision +++ b/bt5/erp5_computer_immobilisation/bt/revision @@ -1 +1 @@ -58 \ No newline at end of file +59 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Computer/region_category.xml b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Computer/region_category.xml new file mode 100644 index 0000000000..cd217bd988 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Computer/region_category.xml @@ -0,0 +1,20 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Category Property" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>region_category</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Category Property</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_property_sheets/bt/revision b/product/ERP5/bootstrap/erp5_property_sheets/bt/revision index 780fea92d2..efee1f88bb 100644 --- a/product/ERP5/bootstrap/erp5_property_sheets/bt/revision +++ b/product/ERP5/bootstrap/erp5_property_sheets/bt/revision @@ -1 +1 @@ -77 \ No newline at end of file +78 \ No newline at end of file -- 2.30.9