Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
99ddd946
Commit
99ddd946
authored
Apr 11, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMFActivity: small refactoring
parent
8063c50a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
14 deletions
+9
-14
product/CMFActivity/Activity/SQLDict.py
product/CMFActivity/Activity/SQLDict.py
+1
-7
product/CMFActivity/Activity/SQLQueue.py
product/CMFActivity/Activity/SQLQueue.py
+1
-7
product/CMFActivity/ActivityTool.py
product/CMFActivity/ActivityTool.py
+7
-0
No files found.
product/CMFActivity/Activity/SQLDict.py
View file @
99ddd946
...
@@ -65,13 +65,7 @@ class SQLDict(SQLBase):
...
@@ -65,13 +65,7 @@ class SQLDict(SQLBase):
priority_list
=
[
message
.
activity_kw
.
get
(
'priority'
,
1
)
for
message
in
registered_message_list
]
priority_list
=
[
message
.
activity_kw
.
get
(
'priority'
,
1
)
for
message
in
registered_message_list
]
dumped_message_list
=
[
self
.
dumpMessage
(
message
)
for
message
in
registered_message_list
]
dumped_message_list
=
[
self
.
dumpMessage
(
message
)
for
message
in
registered_message_list
]
date_list
=
[
message
.
activity_kw
.
get
(
'at_date'
,
None
)
for
message
in
registered_message_list
]
date_list
=
[
message
.
activity_kw
.
get
(
'at_date'
,
None
)
for
message
in
registered_message_list
]
group_method_id_list
=
[]
group_method_id_list
=
[
m
.
getGroupId
()
for
m
in
registered_message_list
]
for
m
in
registered_message_list
:
group_method_id
=
m
.
activity_kw
.
get
(
'group_method_id'
,
''
)
if
group_method_id
is
None
:
group_method_id
=
'portal_activities/dummyGroupMethod/'
+
m
.
method_id
group_method_id_list
.
append
(
group_method_id
+
'
\
0
'
+
m
.
activity_kw
.
get
(
'group_id'
,
''
))
tag_list
=
[
message
.
activity_kw
.
get
(
'tag'
,
''
)
for
message
in
registered_message_list
]
tag_list
=
[
message
.
activity_kw
.
get
(
'tag'
,
''
)
for
message
in
registered_message_list
]
serialization_tag_list
=
[
message
.
activity_kw
.
get
(
'serialization_tag'
,
''
)
for
message
in
registered_message_list
]
serialization_tag_list
=
[
message
.
activity_kw
.
get
(
'serialization_tag'
,
''
)
for
message
in
registered_message_list
]
order_validation_text_list
=
[
self
.
getOrderValidationText
(
message
)
for
message
in
registered_message_list
]
order_validation_text_list
=
[
self
.
getOrderValidationText
(
message
)
for
message
in
registered_message_list
]
...
...
product/CMFActivity/Activity/SQLQueue.py
View file @
99ddd946
...
@@ -66,13 +66,7 @@ class SQLQueue(SQLBase):
...
@@ -66,13 +66,7 @@ class SQLQueue(SQLBase):
method_id_list
=
[
m
.
method_id
for
m
in
registered_message_list
]
method_id_list
=
[
m
.
method_id
for
m
in
registered_message_list
]
priority_list
=
[
m
.
activity_kw
.
get
(
'priority'
,
1
)
for
m
in
registered_message_list
]
priority_list
=
[
m
.
activity_kw
.
get
(
'priority'
,
1
)
for
m
in
registered_message_list
]
date_list
=
[
m
.
activity_kw
.
get
(
'at_date'
,
None
)
for
m
in
registered_message_list
]
date_list
=
[
m
.
activity_kw
.
get
(
'at_date'
,
None
)
for
m
in
registered_message_list
]
group_method_id_list
=
[]
group_method_id_list
=
[
m
.
getGroupId
()
for
m
in
registered_message_list
]
for
m
in
registered_message_list
:
group_method_id
=
m
.
activity_kw
.
get
(
'group_method_id'
,
''
)
if
group_method_id
is
None
:
group_method_id
=
'portal_activities/dummyGroupMethod/'
+
m
.
method_id
group_method_id_list
.
append
(
group_method_id
+
'
\
0
'
+
m
.
activity_kw
.
get
(
'group_id'
,
''
))
tag_list
=
[
m
.
activity_kw
.
get
(
'tag'
,
''
)
for
m
in
registered_message_list
]
tag_list
=
[
m
.
activity_kw
.
get
(
'tag'
,
''
)
for
m
in
registered_message_list
]
serialization_tag_list
=
[
m
.
activity_kw
.
get
(
'serialization_tag'
,
''
)
for
m
in
registered_message_list
]
serialization_tag_list
=
[
m
.
activity_kw
.
get
(
'serialization_tag'
,
''
)
for
m
in
registered_message_list
]
dumped_message_list
=
[
self
.
dumpMessage
(
m
)
for
m
in
registered_message_list
]
dumped_message_list
=
[
self
.
dumpMessage
(
m
)
for
m
in
registered_message_list
]
...
...
product/CMFActivity/ActivityTool.py
View file @
99ddd946
...
@@ -203,6 +203,13 @@ class Message(BaseMessage):
...
@@ -203,6 +203,13 @@ class Message(BaseMessage):
request
.
environ
[
'HTTP_ACCEPT_LANGUAGE'
]
request
.
environ
[
'HTTP_ACCEPT_LANGUAGE'
]
self
.
request_info
[
'_script'
]
=
list
(
request
.
_script
)
self
.
request_info
[
'_script'
]
=
list
(
request
.
_script
)
def
getGroupId
(
self
):
get
=
self
.
activity_kw
.
get
group_method_id
=
get
(
'group_method_id'
,
''
)
if
group_method_id
is
None
:
group_method_id
=
'portal_activities/dummyGroupMethod/'
+
self
.
method_id
return
group_method_id
+
'
\
0
'
+
get
(
'group_id'
,
''
)
def
getObject
(
self
,
activity_tool
):
def
getObject
(
self
,
activity_tool
):
"""return the object referenced in this message."""
"""return the object referenced in this message."""
return
activity_tool
.
unrestrictedTraverse
(
self
.
object_path
)
return
activity_tool
.
unrestrictedTraverse
(
self
.
object_path
)
...
...
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