Commit a29bb541 authored by Jérome Perrin's avatar Jérome Perrin

Configurator and workflow cleanups

* Assorted small fixes so that form comply to conventions
* Minimal fixes of invalid html
* make `mixin` usable in type definition 

The context is I was working on a custom configurator involving some matrixboxs, so I needed a simple business configuration item just to store the matrix result. This was possible with mixin, I just made a portal type based on Item class, enabling mxins for `Matrix` and `BusinessConfiguratorItem` and I did not have to define a class ( not sure this is really better ).

Then the matrixbox was not rendering properly, because browser was confused by the broken html and build a "different DOM" and selectors did not apply. This is what `configurator: fix (a bit) invalid HTML` addresses.

While doing this, fix some minor problems found with forms.

/reviewed-on nexedi/erp5!814
parents e6573300 6e0cad48
......@@ -73,7 +73,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Workflow_launchConfiguration</string> </value>
<value> <string>string:${object_url}/Workflow_viewLaunchConfigurationDialog</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -83,7 +83,7 @@
<key> <string>left</string> </key>
<value>
<list>
<string>my_view_mode_listbox_business_configuration</string>
<string>my_list_mode_listbox_business_configuration</string>
<string>my_view_mode_creation_date</string>
<string>my_view_mode_translated_simulation_state_title</string>
<string>my_view_mode_translated_validation_state_title</string>
......
......@@ -10,11 +10,8 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>all_columns</string>
<string>columns</string>
<string>editable_columns</string>
<string>portal_types</string>
<string>search_columns</string>
<string>selection_name</string>
<string>sort</string>
<string>title</string>
......@@ -23,7 +20,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_view_mode_listbox_business_configuration</string> </value>
<value> <string>my_list_mode_listbox_business_configuration</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -79,44 +76,13 @@
<value>
<dictionary>
<item>
<key> <string>all_columns</string> </key>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>reference</string>
<string>Site ID</string>
</tuple>
<tuple>
<string>resource_title</string>
<string>Workflow</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>Validation State</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>Installation State</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>comment</string>
<string>Comments</string>
</tuple>
<tuple>
<string>getCurrentStateTitle</string>
<string>Wizard State</string>
<string>title</string>
<string>Business Configuration</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>reference</string>
<string>Reference</string>
......@@ -140,17 +106,6 @@
</list>
</value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>creation_date</string>
<string>creation_date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
......@@ -170,33 +125,6 @@
</list>
</value>
</item>
<item>
<key> <string>search_columns</string> </key>
<value>
<list>
<tuple>
<string>reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>resource_title</string>
<string>Workflow</string>
</tuple>
<tuple>
<string>creation_date</string>
<string>Creation Date</string>
</tuple>
<tuple>
<string>translated_validation_state_title</string>
<string>State</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>Installation State</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>business_configuration_module_selection</string> </value>
......@@ -218,7 +146,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Business Configuration</string> </value>
<value> <string>Business Configurations</string> </value>
</item>
</dictionary>
</value>
......
......@@ -12,11 +12,8 @@
<list>
<string>columns</string>
<string>count_method</string>
<string>lines</string>
<string>list_method</string>
<string>portal_types</string>
<string>search</string>
<string>select</string>
<string>selection_name</string>
<string>title</string>
</list>
......@@ -104,16 +101,12 @@
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>lines</string> </key>
<value> <int>10</int> </value>
</item>
<item>
<key> <string>list_method</string> </key>
<value>
......@@ -139,14 +132,6 @@
</list>
</value>
</item>
<item>
<key> <string>search</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>select</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>configuration_save_selection</string> </value>
......
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox_business_configuration</string> </value>
<value> <string>my_list_mode_listbox_business_configuration</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......
......@@ -98,9 +98,6 @@
<value>
<list>
<string>my_title</string>
<string>my_configuration_state</string>
<string>my_translated_simulation_state_title</string>
<string>my_translated_validation_state_title</string>
</list>
</value>
</item>
......@@ -111,6 +108,9 @@
<string>my_resource_title</string>
<string>my_specialise_title</string>
<string>my_comment</string>
<string>my_translated_simulation_state_title</string>
<string>my_translated_validation_state_title</string>
<string>my_configuration_state</string>
</list>
</value>
</item>
......
portal = context.getPortalObject()
request = context.REQUEST
bc = context.business_configuration_module.newContent(
resource = context.getRelativeUrl()
resource=context.getRelativeUrl(),
title=title,
)
request.set("field_your_business_configuration", bc.getRelativeUrl())
# Configurator use a cookie to know what's the "current" configuration,
# we also need to initialize this cookie (yes, this is a ugly)
request.RESPONSE.setCookie(
'business_configuration_key',
bc.getRelativeUrl(),
path=portal.portal_configurator.absolute_url_path()
)
return portal.portal_configurator.login(REQUEST=request)
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
<value> <string>title</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
<?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>_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/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Workflow_launchConfiguration</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>multipart/form-data</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>your_title</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Workflow_viewLaunchConfigurationDialog</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_dialog</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>Launch Configuration</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>
<?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>description</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_title</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>
</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>The title for the new business configuration that will be created.</string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_dialog_mode_title</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>Business Configuration</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>context/getTitle</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -65,11 +65,11 @@
<table width="100%" class="Border">
<tr>
<td tal:repeat="cell row" valign="top">
<table width="100%">
<div width="100%">
<tal:block tal:repeat="field python:form.get_fields_in_group(groups[cell])">
<tal:block metal:use-macro="here/field_render/macros/field_render"/>
</tal:block>
</table>
</div>
</td>
</tr>
</table>
......
......@@ -10,13 +10,17 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Build Business Configuration</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BusinessConfiguration_viewBuildWorkflowActionDialog?workflow_action=build_action</string> </value>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=build_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
......
......@@ -10,13 +10,17 @@
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string>Install Business Configuration</string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string>%(content_url)s/BaseWorkflow_viewWorkflowActionDialog?workflow_action=finish_install_action</string> </value>
<value> <string>%(content_url)s/Base_viewWorkflowActionDialog?workflow_action=install_action</string> </value>
</item>
<item>
<key> <string>after_script_name</string> </key>
......
......@@ -85,6 +85,7 @@
<key> <string>left</string> </key>
<value>
<list>
<string>my_int_index</string>
<string>my_title</string>
<string>my_destination_title_list</string>
</list>
......
<?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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_int_index</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>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>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_int_index</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -87,6 +87,7 @@
<key> <string>left</string> </key>
<value>
<list>
<string>my_int_index</string>
<string>my_title</string>
<string>my_destination_title</string>
<string>my_guard_expression</string>
......
<?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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_int_index</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>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>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_int_index</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -259,12 +259,24 @@
</item>
<item>
<key> <string>image_format</string> </key>
<value> <string>gif</string> </value>
<value> <string>png</string> </value>
</item>
<item>
<key> <string>image_pre_converted_only</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>image_quality</string> </key>
<value> <int>75</int> </value>
</item>
<item>
<key> <string>image_resolution</string> </key>
<value> <int>75</int> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string>text</string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......
......@@ -80,6 +80,8 @@
<value>
<list>
<string>listbox_title</string>
<string>listbox_destination_title_list</string>
<string>listbox_int_index</string>
</list>
</value>
</item>
......
......@@ -10,11 +10,13 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>anchor</string>
<string>columns</string>
<string>default_params</string>
<string>editable_columns</string>
<string>portal_types</string>
<string>selection_name</string>
<string>sort</string>
<string>title</string>
</list>
</value>
......@@ -76,13 +78,17 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>anchor</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple>
<string>title</string>
......@@ -90,7 +96,7 @@
</tuple>
<tuple>
<string>destination_title_list</string>
<string>Possibles Transition</string>
<string>Possible Transitions</string>
</tuple>
<tuple>
<string>description</string>
......@@ -109,6 +115,10 @@
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
......@@ -139,6 +149,17 @@
<key> <string>selection_name</string> </key>
<value> <string>workflow_state_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......
<?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>editable</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_destination_title_list</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>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>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_lines_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>Possible Transitions</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_int_index</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>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>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_int_index</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -80,6 +80,7 @@
<value>
<list>
<string>listbox_title</string>
<string>listbox_int_index</string>
</list>
</value>
</item>
......
......@@ -10,11 +10,13 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>anchor</string>
<string>columns</string>
<string>selection_name</string>
<string>portal_types</string>
<string>editable_columns</string>
<string>portal_types</string>
<string>selection_name</string>
<string>sort</string>
<string>title</string>
</list>
</value>
</item>
......@@ -75,13 +77,17 @@
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>anchor</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>ID</string>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple>
<string>title</string>
......@@ -98,6 +104,10 @@
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
......@@ -128,6 +138,17 @@
<key> <string>selection_name</string> </key>
<value> <string>workflow_transition_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......
<?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/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_int_index</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>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>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_int_index</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,8 +10,8 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
<string>items</string>
<string>title</string>
</list>
</value>
</item>
......@@ -71,6 +71,10 @@
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
......@@ -86,6 +90,12 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......@@ -102,16 +112,13 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(x.getTitleOrId(), x.getId()) for x in here.portal_categories.contentValues()]</string> </value>
<value> <string>python: [(\'\', \'\')] + sorted([(x.getCompactTranslatedTitle(), x.getId()) for x in here.portal_categories.contentValues()])</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -38,6 +38,7 @@ this_module = sys.modules[ __name__ ]
document_classes = updateGlobals(this_module, globals(),
permissions_module=Permissions)
import mixin
from Tool import ConfiguratorTool
# Define object classes and tools
......
......@@ -648,3 +648,12 @@ class TestConfiguratorItem(TestLiveConfiguratorWorkflowMixin):
self.assertEqual(pay_link.getDeliveryBuilderList(),
["portal_deliveries/payment_transaction_builder"])
def test_configurator_item_mixin(self):
"""ConfiguratorItemMixin is available for TTW definition of portal types.
"""
self.assertIn(
'ConfiguratorItemMixin',
self.portal.portal_types.newContent(
portal_type='Base Type',
temp_object=True).getMixinTypeList())
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment