Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
cdea4486
Commit
cdea4486
authored
Feb 14, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_hal_json_style] Listbox: do not use empty portal_type parameter
parent
90c7c7aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+1
-1
bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py
...plateItem/portal_components/test.erp5.testHalJsonStyle.py
+1
-1
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
cdea4486
...
@@ -663,7 +663,7 @@ def renderField(traversed_document, field, form, value=None, meta_type=None, key
...
@@ -663,7 +663,7 @@ def renderField(traversed_document, field, form, value=None, meta_type=None, key
# ListBoxes in report view has portal_type defined already in default_params
# ListBoxes in report view has portal_type defined already in default_params
# in that case we prefer non_empty version
# in that case we prefer non_empty version
list_method_query_dict
=
default_params
.
copy
()
list_method_query_dict
=
default_params
.
copy
()
if
not
list_method_query_dict
.
get
(
"portal_type"
,
[]):
if
not
list_method_query_dict
.
get
(
"portal_type"
,
[])
and
portal_type_list
:
list_method_query_dict
[
"portal_type"
]
=
[
x
for
x
,
_
in
portal_type_list
]
list_method_query_dict
[
"portal_type"
]
=
[
x
for
x
,
_
in
portal_type_list
]
list_method_custom
=
None
list_method_custom
=
None
...
...
bt5/erp5_hal_json_style/TestTemplateItem/portal_components/test.erp5.testHalJsonStyle.py
View file @
cdea4486
...
@@ -878,7 +878,7 @@ class TestERP5Document_getHateoas_mode_traverse(ERP5HALJSONStyleSkinsMixin):
...
@@ -878,7 +878,7 @@ class TestERP5Document_getHateoas_mode_traverse(ERP5HALJSONStyleSkinsMixin):
self.assertEqual(result_dict['
_embedded
']['
_view
']['
report_section_list
'][1]['
listbox
']['
editable_column_list
'], [['
time
', '
Time
'], ['
comment
', '
Comment
'], ['
error_message
', '
Error
Message
']])
self.assertEqual(result_dict['
_embedded
']['
_view
']['
report_section_list
'][1]['
listbox
']['
editable_column_list
'], [['
time
', '
Time
'], ['
comment
', '
Comment
'], ['
error_message
', '
Error
Message
']])
self.assertEqual(result_dict['
_embedded
']['
_view
']['
report_section_list
'][1]['
listbox
']['
sort_column_list
'], [])
self.assertEqual(result_dict['
_embedded
']['
_view
']['
report_section_list
'][1]['
listbox
']['
sort_column_list
'], [])
self.assertEqual(result_dict['
_embedded
']['
_view
']['
report_section_list
'][1]['
listbox
']['
list_method_template
'],
self.assertEqual(result_dict['
_embedded
']['
_view
']['
report_section_list
'][1]['
listbox
']['
list_method_template
'],
'
%
s
/
web_site_module
/
hateoas
/
ERP5Document_getHateoas
?
mode
=
search
&
relative_url
=
foo_module
%%
2
F
%
s
&
form_relative_url
=
portal_skins
/
erp5_core
/
Base_viewWorkflowHistory
/
listbox
&
list_method
=
Base_getWorkflowHistoryItemList
&
default_param_json
=
eyJ3b3JrZmxvd19pZCI6ICJmb29fd29ya2Zsb3ciLCAi
cG9ydGFsX3R5cGUiOiBbXSwgImNoZWNrZWRfcGVybWlzc2lvbiI6ICJWaWV3IiwgIndvcmtmbG93X3RpdGxlIjogIkZvbyBXb3JrZmxvdyIsICJpZ25vcmVfdW5rbm93bl9jb2x1bW5zIjogdHJ1ZX0
=
{
&
query
,
select_list
*
,
limit
*
,
sort_on
*
,
local_roles
*
}
' % (self.portal.absolute_url(), document.getId()))
'
%
s
/
web_site_module
/
hateoas
/
ERP5Document_getHateoas
?
mode
=
search
&
relative_url
=
foo_module
%%
2
F
%
s
&
form_relative_url
=
portal_skins
/
erp5_core
/
Base_viewWorkflowHistory
/
listbox
&
list_method
=
Base_getWorkflowHistoryItemList
&
default_param_json
=
eyJ3b3JrZmxvd19pZCI6ICJmb29fd29ya2Zsb3ciLCAi
Y2hlY2tlZF9wZXJtaXNzaW9uIjogIlZpZXciLCAid29ya2Zsb3dfdGl0bGUiOiAiRm9vIFdvcmtmbG93IiwgImlnbm9yZV91bmtub3duX2NvbHVtbnMiOiB0cnVlfQ
=
=
{
&
query
,
select_list
*
,
limit
*
,
sort_on
*
,
local_roles
*
}
' % (self.portal.absolute_url(), document.getId()))
@simulate('
Base_getRequestUrl
', '
*
args
,
**
kwargs
',
@simulate('
Base_getRequestUrl
', '
*
args
,
**
kwargs
',
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment