From e7245d30fc6c281b75697a28f3aaa5e26c4c27b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 31 Mar 2008 16:57:54 +0000 Subject: [PATCH] 2008-03-31 jerome * Add default_image on Products. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20233 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../allowed_content_types.xml | 1 + .../hidden_content_type_list.xml | 1 + .../property_sheet_list.xml | 5 + .../portal_skins/erp5_pdm/Product_view.xml | 14 ++- .../Product_view/my_default_image_file.xml | 105 ++++++++++++++++ .../Product_view/my_default_image_path.xml | 115 ++++++++++++++++++ bt5/erp5_pdm/bt/change_log | 3 + bt5/erp5_pdm/bt/revision | 2 +- ...late_portal_type_allowed_content_type_list | 1 + ...plate_portal_type_hidden_content_type_list | 1 + .../template_portal_type_property_sheet_list | 1 + 11 files changed, 247 insertions(+), 2 deletions(-) create mode 100644 bt5/erp5_pdm/PortalTypePropertySheetTemplateItem/property_sheet_list.xml create mode 100644 bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view/my_default_image_file.xml create mode 100644 bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view/my_default_image_path.xml diff --git a/bt5/erp5_pdm/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml b/bt5/erp5_pdm/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml index 2216744365..359e5e6eb9 100644 --- a/bt5/erp5_pdm/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml +++ b/bt5/erp5_pdm/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml @@ -8,6 +8,7 @@ <item>Component</item> </portal_type> <portal_type id="Product"> + <item>Image</item> <item>Sale Supply Line</item> <item>Supply Line</item> <item>Purchase Supply Line</item> diff --git a/bt5/erp5_pdm/PortalTypeHiddenContentTypeTemplateItem/hidden_content_type_list.xml b/bt5/erp5_pdm/PortalTypeHiddenContentTypeTemplateItem/hidden_content_type_list.xml index 0dc7db2ce9..e02ddd2646 100644 --- a/bt5/erp5_pdm/PortalTypeHiddenContentTypeTemplateItem/hidden_content_type_list.xml +++ b/bt5/erp5_pdm/PortalTypeHiddenContentTypeTemplateItem/hidden_content_type_list.xml @@ -5,6 +5,7 @@ <item>Supply Line</item> </portal_type> <portal_type id="Product"> + <item>Image</item> <item>Sale Supply Line</item> <item>Supply Line</item> <item>Purchase Supply Line</item> diff --git a/bt5/erp5_pdm/PortalTypePropertySheetTemplateItem/property_sheet_list.xml b/bt5/erp5_pdm/PortalTypePropertySheetTemplateItem/property_sheet_list.xml new file mode 100644 index 0000000000..1a4f5bfad4 --- /dev/null +++ b/bt5/erp5_pdm/PortalTypePropertySheetTemplateItem/property_sheet_list.xml @@ -0,0 +1,5 @@ +<property_sheet_list> + <portal_type id="Product"> + <item>DefaultImage</item> + </portal_type> +</property_sheet_list> \ No newline at end of file diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view.xml index c16e5231e1..84d9f29432 100644 --- a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view.xml +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view.xml @@ -52,13 +52,23 @@ <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> + <value> <string>multipart/form-data</string> </value> </item> <item> <key> <string>group_list</string> </key> @@ -101,6 +111,8 @@ <string>my_ean13_code</string> <string>my_aggregated_portal_type_list</string> <string>my_required_aggregated_portal_type_list</string> + <string>my_default_image_path</string> + <string>my_default_image_file</string> </list> </value> </item> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view/my_default_image_file.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view/my_default_image_file.xml new file mode 100644 index 0000000000..3b36e7bf07 --- /dev/null +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view/my_default_image_file.xml @@ -0,0 +1,105 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>description</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_default_image_file</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>description</string> </key> + <value> <string>Upload the photo for this person.</string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_file</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>File_viewFieldLibrary</string> </value> + </item> + <item> + <key> <string>target</string> </key> + <value> <string>Click to edit the target</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view/my_default_image_path.xml b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view/my_default_image_path.xml new file mode 100644 index 0000000000..f710d96844 --- /dev/null +++ b/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Product_view/my_default_image_path.xml @@ -0,0 +1,115 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <tuple> + <global name="ProxyField" module="Products.ERP5Form.ProxyField"/> + <tuple/> + </tuple> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_owner</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>delegated_list</string> </key> + <value> + <list> + <string>title</string> + <string>description</string> + <string>default</string> + </list> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>my_default_image_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> + <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>default</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>field_id</string> </key> + <value> <string>my_thumbnail</string> </value> + </item> + <item> + <key> <string>form_id</string> </key> + <value> <string>File_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>Image</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_pdm/bt/change_log b/bt5/erp5_pdm/bt/change_log index f7cf571770..e647cb097c 100644 --- a/bt5/erp5_pdm/bt/change_log +++ b/bt5/erp5_pdm/bt/change_log @@ -1,3 +1,6 @@ +2008-03-31 jerome +* Add default_image on Products. + 2008-02-07 alex * proxify some fields, use Resource_viewFieldLibrary instead of BasePdm_fieldLibrary * on resource, add two supply types (purchase and sale) instead of one diff --git a/bt5/erp5_pdm/bt/revision b/bt5/erp5_pdm/bt/revision index aa92725341..780fea92d2 100644 --- a/bt5/erp5_pdm/bt/revision +++ b/bt5/erp5_pdm/bt/revision @@ -1 +1 @@ -76 \ No newline at end of file +77 \ No newline at end of file diff --git a/bt5/erp5_pdm/bt/template_portal_type_allowed_content_type_list b/bt5/erp5_pdm/bt/template_portal_type_allowed_content_type_list index ad98e194e3..ea8c8468a9 100644 --- a/bt5/erp5_pdm/bt/template_portal_type_allowed_content_type_list +++ b/bt5/erp5_pdm/bt/template_portal_type_allowed_content_type_list @@ -3,6 +3,7 @@ Component | Purchase Supply Line Component | Sale Supply Line Component | Supply Line Product Module | Product +Product | Image Product | Purchase Supply Line Product | Sale Supply Line Product | Supply Line diff --git a/bt5/erp5_pdm/bt/template_portal_type_hidden_content_type_list b/bt5/erp5_pdm/bt/template_portal_type_hidden_content_type_list index 318aff871a..d7fe81a073 100644 --- a/bt5/erp5_pdm/bt/template_portal_type_hidden_content_type_list +++ b/bt5/erp5_pdm/bt/template_portal_type_hidden_content_type_list @@ -1,6 +1,7 @@ Component | Purchase Supply Line Component | Sale Supply Line Component | Supply Line +Product | Image Product | Purchase Supply Line Product | Sale Supply Line Product | Supply Line diff --git a/bt5/erp5_pdm/bt/template_portal_type_property_sheet_list b/bt5/erp5_pdm/bt/template_portal_type_property_sheet_list index e69de29bb2..b7fbc179a9 100644 --- a/bt5/erp5_pdm/bt/template_portal_type_property_sheet_list +++ b/bt5/erp5_pdm/bt/template_portal_type_property_sheet_list @@ -0,0 +1 @@ +Product | DefaultImage \ No newline at end of file -- 2.30.9