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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tomáš Peterka
erp5
Commits
54176024
Commit
54176024
authored
Feb 13, 2018
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/json-value-resolution' into test/rjsacc
parents
ff19ed5c
e2940b90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+8
-3
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
54176024
...
...
@@ -273,9 +273,14 @@ def getAttrFromAnything(search_result, select, search_property_getter, kwargs):
# Following part resolves values on other objects than Documents
# Prefer getter (accessor) than raw property name
try
:
underlying_search_result
=
search_result
.
getObject
()
except
:
underlying_search_result
=
search_result
if
contents_value
is
None
:
try
:
contents_value
=
getattr
(
search_result
,
accessor_name
)
contents_value
=
getattr
(
underlying_
search_result
,
accessor_name
)
except
(
AttributeError
,
Unauthorized
):
pass
...
...
@@ -818,7 +823,7 @@ def renderField(traversed_document, field, form, value=None, meta_type=None, key
def
renderForm
(
traversed_document
,
form
,
response_dict
,
key_prefix
=
None
,
selection_params
=
None
):
"""
:param selection_params: holds parameters to construct ERP5Form.Selection instance
for underl
a
ying ListBox - since we do not use selections in RenderJS UI
for underlying ListBox - since we do not use selections in RenderJS UI
we mitigate the functionality here by overriding ListBox's own values
for columns, editable columns, and sort with those found in `selection_params`
"""
...
...
@@ -915,7 +920,7 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti
# ReportBox.render returns a list of ReportSection classes which are
# just containers for FormId(s) usually containing one ListBox
# and its search/query parameters hidden in `selection_params`
# `path` contains relative_url of intended CONTEXT for underl
a
ying ListBox
# `path` contains relative_url of intended CONTEXT for underlying ListBox
report_item_list
.
extend
(
field
.
render
())
# ERP5 Report document differs from a ERP5 Form in only one thing: it has
# `report_method` attached to it - thus we call it right here
...
...
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