Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
94e464ac
Commit
94e464ac
authored
Dec 20, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_administration] Activate actions for ERP5JS
parent
79071ceb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
+26
-4
bt5/erp5_administration/ActionTemplateItem/portal_types/Business%20Template/check_python_code.xml
...em/portal_types/Business%20Template/check_python_code.xml
+2
-2
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/BusinessTemplate_getPythonSourceCodeMessageList.py
...ration/BusinessTemplate_getPythonSourceCodeMessageList.py
+24
-2
No files found.
bt5/erp5_administration/ActionTemplateItem/portal_types/Business%20Template/check_python_code.xml
View file @
94e464ac
...
...
@@ -16,13 +16,13 @@
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_report
</string>
<string>
action_type/object_
jio_
report
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_report
</string>
</value>
<value>
<string>
object_
jio_
report
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
...
...
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/BusinessTemplate_getPythonSourceCodeMessageList.py
View file @
94e464ac
...
...
@@ -7,14 +7,35 @@ class Message:
Supports both being displayed in a listbox and being printed.
"""
def
__init__
(
self
,
location
,
message
,
edit_url
):
def
__init__
(
self
,
location
,
message
,
edit_url
,
jio_key
=
None
):
self
.
location
=
location
self
.
message
=
message
self
.
edit_url
=
edit_url
self
.
jio_key
=
jio_key
def
getListItemUrl
(
self
,
*
args
,
**
kw
):
return
self
.
edit_url
def
getListItemUrlDict
(
self
,
*
args
,
**
kw
):
if
self
.
jio_key
is
None
:
# Use raw portal skins edition
return
{
'command'
:
'raw'
,
'options'
:
{
'url'
:
self
.
edit_url
}
}
else
:
# Stay in ERP5JS
# XXX How to focus on the line to change directly?
return
{
'command'
:
'push_history'
,
'options'
:
{
'jio_key'
:
self
.
jio_key
,
'editable'
:
True
,
}
}
def
__repr__
(
self
):
return
"{}:{}"
.
format
(
self
.
location
,
self
.
message
)
...
...
@@ -52,7 +73,8 @@ def checkComponent(component_instance):
Message
(
location
=
"{component_path}:{row}:{column}"
.
format
(
**
annotation
),
message
=
annotation
[
"text"
],
edit_url
=
"{component_path}?line={row}"
.
format
(
**
annotation
),))
edit_url
=
"{component_path}?line={row}"
.
format
(
**
annotation
),
jio_key
=
annotation
[
'component_path'
],),)
# Check scripts
script_container_list
=
[]
...
...
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