diff --git a/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py b/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py index 1f5a049c2ea23d79ccf07122e95788ad5660519d..00b8e746d0a009e51b3395bc3037a3472b57e3eb 100644 --- a/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py +++ b/bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py @@ -754,7 +754,8 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None, k "query": sql_catalog.buildQuery( list_method_query_dict, ignore_unknown_columns=True).asSearchTextExpression(sql_catalog)})}, - "domain_root_list": [(x, Base_translateString(y)) for x, y in field.get_value("domain_root_list")] + "domain_root_list": [(x, Base_translateString(y)) for x, y in field.get_value("domain_root_list")], + "selection_name": field.get_value('selection_name') }) result["domain_dict"] = getDomainSelection([x[0] for x in result["domain_root_list"]]) diff --git a/bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py b/bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py index f1e16cc2fea61bf590f580d1ff9ec9202bbc27fe..1e6c6338bb24f6c0ce9cd88f978101c0bf4062e8 100644 --- a/bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py +++ b/bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py @@ -649,6 +649,7 @@ class TestERP5Document_getHateoas_mode_traverse(ERP5HALJSONStyleSkinsMixin): self.assertEqual(result_dict['_embedded']['_view']['listbox']['type'], 'ListBox') self.assertEqual(result_dict['_embedded']['_view']['listbox']['key'], 'field_listbox') self.assertEqual(result_dict['_embedded']['_view']['listbox']['title'], 'Foo Lines') + self.assertEqual(result_dict['_embedded']['_view']['listbox']['selection_name'], 'foo_selection') self.assertEqual(result_dict['_embedded']['_view']['listbox']['lines'], 3) self.assertEqual(result_dict['_embedded']['_view']['listbox']['editable'], 1) self.assertEqual(result_dict['_embedded']['_view']['listbox']['show_anchor'], 0) @@ -1175,6 +1176,7 @@ class TestERP5Document_getHateoas_mode_traverse(ERP5HALJSONStyleSkinsMixin): self.assertEqual(result_dict['_embedded']['_view']['report_section_list'][1]['listbox']['type'], 'ListBox') self.assertEqual(result_dict['_embedded']['_view']['report_section_list'][1]['listbox']['key'], 'x1_listbox') self.assertEqual(result_dict['_embedded']['_view']['report_section_list'][1]['listbox']['title'], 'Workflow History') + self.assertEqual(result_dict['_embedded']['_view']['report_section_list'][1]['listbox']['selection_name'], 'base_workflow_history_selection') self.assertEqual(result_dict['_embedded']['_view']['report_section_list'][1]['listbox']['lines'], 15) self.assertEqual(result_dict['_embedded']['_view']['report_section_list'][1]['listbox']['editable'], 1) self.assertEqual(result_dict['_embedded']['_view']['report_section_list'][1]['listbox']['show_anchor'], 0) diff --git a/bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.xml b/bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.xml index e03cabe57d786275d1d7a3ef294ec897c9fc4db6..436952a42e36e03e037677ada08d6e361afa6e3e 100644 --- a/bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.xml +++ b/bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.xml @@ -100,24 +100,28 @@ </record> <record id="4" aka="AAAAAAAAAAQ="> <pickle> - <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> + <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> </pickle> <pickle> - <tuple> - <none/> - <list> - <dictionary> - <item> - <key> <string>action</string> </key> - <value> <string>validate</string> </value> - </item> - <item> - <key> <string>validation_state</string> </key> - <value> <string>validated</string> </value> - </item> - </dictionary> - </list> - </tuple> + <dictionary> + <item> + <key> <string>_log</string> </key> + <value> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>validate</string> </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>validated</string> </value> + </item> + </dictionary> + </list> + </value> + </item> + </dictionary> </pickle> </record> </ZopeData>