Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
b92bc438
Commit
b92bc438
authored
May 07, 2018
by
Tomáš Peterka
Committed by
Tomáš Peterka
May 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_core] Rename Form_getListbox to Base_getListbox
parent
49908335
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
15 deletions
+19
-15
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
...portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
+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
-1
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
...al_components/extension.erp5.FolderWorkflowActionUtils.py
+3
-1
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.xml
...l_components/extension.erp5.FolderWorkflowActionUtils.xml
+3
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getListbox.py
...kinTemplateItem/portal_skins/erp5_core/Base_getListbox.py
+6
-6
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getListbox.xml
...inTemplateItem/portal_skins/erp5_core/Base_getListbox.xml
+2
-2
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_searchUsingFormIdAndQuery.py
.../portal_skins/erp5_core/Base_searchUsingFormIdAndQuery.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatusDialog/listbox.xml
...p5_core/Folder_modifyDocumentListStatusDialog/listbox.xml
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_viewDeleteDialog/listbox.xml
...ortal_skins/erp5_core/Folder_viewDeleteDialog/listbox.xml
+1
-1
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/Base_callDialogMethod.py
View file @
b92bc438
...
@@ -207,7 +207,7 @@ select_all = extra_param.get("basedialog_select_all", 0)
...
@@ -207,7 +207,7 @@ select_all = extra_param.get("basedialog_select_all", 0)
# inject `uids` into Scripts **kwargs when we got any `query` (empty or filled)
# inject `uids` into Scripts **kwargs when we got any `query` (empty or filled)
if
query
is
not
None
:
if
query
is
not
None
:
listbox
=
getattr
(
context
,
form_id
).
Form
_getListbox
()
listbox
=
getattr
(
context
,
form_id
).
Base
_getListbox
()
if
listbox
is
not
None
:
if
listbox
is
not
None
:
kw
[
'uids'
]
=
[
int
(
getattr
(
document
,
"uid"
))
kw
[
'uids'
]
=
[
int
(
getattr
(
document
,
"uid"
))
for
document
in
context
.
Base_searchUsingListbox
(
listbox
,
query
)]
for
document
in
context
.
Base_searchUsingListbox
(
listbox
,
query
)]
...
...
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
b92bc438
...
@@ -1073,7 +1073,7 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti
...
@@ -1073,7 +1073,7 @@ def renderForm(traversed_document, form, response_dict, key_prefix=None, selecti
try
:
try
:
if
last_form_id
:
if
last_form_id
:
last_form
=
getattr
(
context
,
last_form_id
)
last_form
=
getattr
(
context
,
last_form_id
)
last_listbox
=
last_form
.
Form
_getListbox
()
last_listbox
=
last_form
.
Base
_getListbox
()
# In order not to use Selections we need to pass all search attributes to *a listbox inside the form dialog*
# In order not to use Selections we need to pass all search attributes to *a listbox inside the form dialog*
# in case there was a listbox in the previous form. No other case!
# in case there was a listbox in the previous form. No other case!
if
last_listbox
:
if
last_listbox
:
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.py
View file @
b92bc438
...
@@ -57,8 +57,10 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
...
@@ -57,8 +57,10 @@ def getDocumentGroupByWorkflowStateList(self, form_id='', **kw):
Base_translateString
=
portal
.
Base_translateString
Base_translateString
=
portal
.
Base_translateString
wf_tool
=
portal
.
portal_workflow
wf_tool
=
portal
.
portal_workflow
selection_tool
=
portal
.
portal_selections
selection_tool
=
portal
.
portal_selections
last_form
=
getattr
(
self
,
form_id
)
selection_name
=
request
[
'selection_name'
]
last_listbox
=
last_form
.
Base_getListbox
()
selection_name
=
last_listbox
.
get_value
(
'selection_name'
)
# guess all column name from catalog schema
# guess all column name from catalog schema
possible_state_list
=
[
column_name
.
split
(
'.'
)[
1
]
for
column_name
in
possible_state_list
=
[
column_name
.
split
(
'.'
)[
1
]
for
column_name
in
...
...
product/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/portal_components/extension.erp5.FolderWorkflowActionUtils.xml
View file @
b92bc438
...
@@ -45,7 +45,9 @@
...
@@ -45,7 +45,9 @@
<item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<value>
<tuple/>
<tuple>
<string>
W: 55, 2: Unused variable \'request\' (unused-variable)
</string>
</tuple>
</value>
</value>
</item>
</item>
<item>
<item>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Form
_getListbox.py
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base
_getListbox.py
View file @
b92bc438
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
This script should be used to detect a listbox without having to name it "listbox".
This script should be used to detect a listbox without having to name it "listbox".
:param form: {Form} optional Form instance instead of calling this script directly on a Form
:param form_or_id: {Form/str} optional Form instance (otherwise context-Form) or form_id (will be retrieved on context-Document)
:param form_id: {str} if specified the Script must be called on currently traversed document
Christophe Dumez <christophe@nexedi.com>
Christophe Dumez <christophe@nexedi.com>
"""
"""
...
@@ -17,11 +16,12 @@ def isListBox(field):
...
@@ -17,11 +16,12 @@ def isListBox(field):
return
True
return
True
return
False
return
False
if
form_id
is
not
None
:
if
form_or_id
is
None
:
form
=
getattr
(
context
,
form_id
)
if
form
is
None
:
form
=
context
form
=
context
elif
isinstance
(
form_or_id
,
str
):
form
=
getattr
(
context
,
form_or_id
)
else
:
form
=
form_or_id
if
form
.
meta_type
not
in
(
'ERP5 Form'
,
'Folder'
,
'ERP5 Folder'
):
if
form
.
meta_type
not
in
(
'ERP5 Form'
,
'Folder'
,
'ERP5 Folder'
):
raise
RuntimeError
(
"Cannot get Listbox field from
\
"
{!s}
\
"
! Supported is only ERP5 Form and (ERP5) Folder"
.
format
(
form
.
meta_type
))
raise
RuntimeError
(
"Cannot get Listbox field from
\
"
{!s}
\
"
! Supported is only ERP5 Form and (ERP5) Folder"
.
format
(
form
.
meta_type
))
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Form
_getListbox.xml
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/
Base
_getListbox.xml
View file @
b92bc438
...
@@ -50,11 +50,11 @@
...
@@ -50,11 +50,11 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
form
=None, form
_id=None
</string>
</value>
<value>
<string>
form
_or
_id=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Form
_getListbox
</string>
</value>
<value>
<string>
Base
_getListbox
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_searchUsingFormIdAndQuery.py
View file @
b92bc438
...
@@ -4,6 +4,6 @@ This script is intended to be used only internally.
...
@@ -4,6 +4,6 @@ This script is intended to be used only internally.
"""
"""
form
=
getattr
(
context
,
form_id
)
form
=
getattr
(
context
,
form_id
)
listbox
=
form
.
Form
_getListbox
()
listbox
=
form
.
Base
_getListbox
()
return
context
.
Base_searchUsingListbox
(
listbox
,
query
,
sort_on
,
limit
)
return
context
.
Base_searchUsingListbox
(
listbox
,
query
,
sort_on
,
limit
)
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_modifyDocumentListStatusDialog/listbox.xml
View file @
b92bc438
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.
Form_getListbox(form_id=request.get(\'form_id\'
)).getId()
</string>
</value>
<value>
<string>
python: here.
Base_getListbox(request.get("form_id"
)).getId()
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_viewDeleteDialog/listbox.xml
View file @
b92bc438
...
@@ -276,7 +276,7 @@
...
@@ -276,7 +276,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: here.
Form
_getListbox(form_id=request.get(\'form_id\')).getId()
</string>
</value>
<value>
<string>
python: here.
Base
_getListbox(form_id=request.get(\'form_id\')).getId()
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
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