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
Frederic Thoma
erp5
Commits
fe49fd05
Commit
fe49fd05
authored
Nov 15, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_hal_json_style] Ensure action URL parameters are can be used as default field value
parent
ec6473c5
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
207 additions
and
10 deletions
+207
-10
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_account_statement.zpt
...rjs_ui_accounting_report_zuite/test_account_statement.zpt
+1
-1
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_aged_balance.zpt
...renderjs_ui_accounting_report_zuite/test_aged_balance.zpt
+1
-1
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_balance_sheet.zpt
...enderjs_ui_accounting_report_zuite/test_balance_sheet.zpt
+1
-1
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_general_ledger.zpt
...nderjs_ui_accounting_report_zuite/test_general_ledger.zpt
+1
-1
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_journal.zpt
...ests/renderjs_ui_accounting_report_zuite/test_journal.zpt
+1
-1
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_profit_and_loss.zpt
...derjs_ui_accounting_report_zuite/test_profit_and_loss.zpt
+1
-1
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_restricted_skin_selection.zpt
...ccounting_report_zuite/test_restricted_skin_selection.zpt
+1
-1
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_third_parties.zpt
...enderjs_ui_accounting_report_zuite/test_third_parties.zpt
+1
-1
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_trial_balance.zpt
...enderjs_ui_accounting_report_zuite/test_trial_balance.zpt
+1
-1
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
-0
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo/view_url_parameter_dialog.xml
...mplateItem/portal_types/Foo/view_url_parameter_dialog.xml
+83
-0
bt5/erp5_ui_test/bt/template_action_path_list
bt5/erp5_ui_test/bt/template_action_path_list
+2
-1
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testActionUrlParameter.xml
...nderjs_ui_page_templates_zuite/testActionUrlParameter.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testActionUrlParameter.zpt
...nderjs_ui_page_templates_zuite/testActionUrlParameter.zpt
+54
-0
No files found.
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_account_statement.zpt
View file @
fe49fd05
...
...
@@ -41,7 +41,7 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<tr><td>
assertElementPresent
</td>
<td>
//a[@data-i18n="Account Statement"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Account Statement"]
</td><td></td></tr>
<td>
//a[@data-i18n="Account Statement"
and contains(@href, 'account_statement_report')
]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="field_your_node"]/div/div[1]//select
</td><td></td></tr>
...
...
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_aged_balance.zpt
View file @
fe49fd05
...
...
@@ -36,7 +36,7 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Aged Balance"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Aged Balance"]
</td><td></td></tr>
<td>
//a[@data-i18n="Aged Balance"
and contains(@href, 'aged_balance_report')
]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_section_category"]
</td><td></td></tr>
...
...
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_balance_sheet.zpt
View file @
fe49fd05
...
...
@@ -33,7 +33,7 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Balance Sheet"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Balance Sheet"]
</td><td></td></tr>
<td>
//a[@data-i18n="Balance Sheet"
and contains(@href, 'balance_sheet_report')
]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_section_category"]
</td><td></td></tr>
...
...
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_general_ledger.zpt
View file @
fe49fd05
...
...
@@ -42,7 +42,7 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="General Ledger"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="General Ledger"]
</td><td></td></tr>
<td>
//a[@data-i18n="General Ledger"
and contains(@href, 'general_ledger_report')
]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td><td>
//input[@name="field_your_from_date"]
</td><td></td></tr>
<tr><td>
type
</td>
...
...
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_journal.zpt
View file @
fe49fd05
...
...
@@ -28,7 +28,7 @@ Copy of <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5/tes
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Journal"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Journal"]
</td><td></td></tr>
<td>
//a[@data-i18n="Journal"
and contains(@href, 'journal_report')
]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_section_category"]
</td><td></td></tr>
...
...
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_profit_and_loss.zpt
View file @
fe49fd05
...
...
@@ -33,7 +33,7 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Profit and Loss"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Profit and Loss"]
</td><td></td></tr>
<td>
//a[@data-i18n="Profit and Loss"
and contains(@href, 'profit_and_loss_report')
]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_section_category"]
</td><td></td></tr>
...
...
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_restricted_skin_selection.zpt
View file @
fe49fd05
...
...
@@ -28,7 +28,7 @@ Check that use gets notified if they are using wrong 'Report Style' (UI) Prefere
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Journal"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Journal"]
</td><td></td></tr>
<td>
//a[@data-i18n="Journal"
and contains(@href, 'journal_report')
]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_section_category"]
</td><td></td></tr>
<tr><td>
select
</td>
...
...
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_third_parties.zpt
View file @
fe49fd05
...
...
@@ -38,7 +38,7 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Third Parties"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Third Parties"]
</td><td></td></tr>
<td>
//a[@data-i18n="Third Parties"
and contains(@href, 'third_parties_report')
]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//select[@name="field_your_section_category"]
</td><td></td></tr>
...
...
bt5/erp5_accounting_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_accounting_report_zuite/test_trial_balance.zpt
View file @
fe49fd05
...
...
@@ -28,7 +28,7 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<tr><td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Trial Balance"]
</td><td></td></tr>
<tr><td>
click
</td>
<td>
//a[@data-i18n="Trial Balance"]
</td><td></td></tr>
<td>
//a[@data-i18n="Trial Balance"
and contains(@href, 'trial_balance_report')
]
</td><td></td></tr>
<tr><td>
store
</td><td
tal:content=
"python: '{:0>#2d}'.format(now.day())"
></td><td>
day
</td></tr>
<tr><td>
store
</td><td
tal:content=
"python: '{:0>#2d}'.format(now.month())"
></td><td>
month
</td></tr>
...
...
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
fe49fd05
...
...
@@ -1353,6 +1353,7 @@ def calculateHateoas(is_portal=None, is_site_root=None, traversed_document=None,
# Request is later used for method's arguments discovery so set URL params into REQUEST (just like it was sent by form)
for
query_key
,
query_value
in
byteify
(
current_action
[
'params'
].
items
()):
REQUEST
.
set
(
query_key
,
query_value
)
REQUEST
.
form
[
query_key
]
=
query_value
# If our "form" is actually a Script (nothing is sure in ERP5) or anything else than Form
# (e.g. function or bound class method will) not have .meta_type thus be considered a Script
...
...
bt5/erp5_ui_test/ActionTemplateItem/portal_types/Foo/view_url_parameter_dialog.xml
0 → 100644
View file @
fe49fd05
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_jio_action
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
A simple dialog with some standard fields
</string>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view_url_parameter_dialog
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
7.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Check Url Parameter Dialog
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
string:${object_url}/Foo_viewFormBoxDialog?my_id=foo&my_title=bar
]]>
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test/bt/template_action_path_list
View file @
fe49fd05
...
...
@@ -44,4 +44,5 @@ Foo | view_planning
Foo | view_print_dialog
Foo | view_printout_form
Foo | view_proxy_field
Foo | view_relation_field
\ No newline at end of file
Foo | view_relation_field
Foo | view_url_parameter_dialog
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testActionUrlParameter.xml
0 → 100644
View file @
fe49fd05
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</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>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testActionUrlParameter
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testActionUrlParameter.zpt
0 → 100644
View file @
fe49fd05
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test Command Display With History
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test Command Display With History
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/PTZuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module/1
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"
/>
<!-- Wait for gadget to be loaded -->
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_view.html']
</td>
<td></td>
</tr>
<!-- Trigger the dialog display on the panel link -->
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@data-gadget-scope='panel']//a[text()='Check Url Parameter Dialog']
</td>
<td></td>
</tr>
<tal:block
tal:define=
"click_configuration python: {'text': 'Check Url Parameter Dialog'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
assertValue
</td>
<td>
field_my_id
</td>
<td>
foo
</td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
field_my_formbox_my_title
</td>
<td>
bar
</td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
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