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
Noah Brackenbury
erp5
Commits
5f4bd2d2
Commit
5f4bd2d2
authored
Nov 18, 2014
by
Alain Takoudjou
Committed by
Rafael Monnerat
Jul 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Directly use WorkflowTool to access time value.
Mixed commit:
43b1ae1b
2f05fe1b
parent
3f319c34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+9
-8
No files found.
product/ERP5Type/Base.py
View file @
5f4bd2d2
...
@@ -1817,7 +1817,7 @@ class Base( CopyContainer,
...
@@ -1817,7 +1817,7 @@ class Base( CopyContainer,
def
_setValue
(
self
,
id
,
target
,
spec
=
(),
filter
=
None
,
portal_type
=
(),
keep_default
=
1
,
def
_setValue
(
self
,
id
,
target
,
spec
=
(),
filter
=
None
,
portal_type
=
(),
keep_default
=
1
,
checked_permission
=
None
):
checked_permission
=
None
):
getRelativeUrl
=
self
.
getPortalObject
().
portal_url
.
getRelativeUrl
getRelativeUrl
=
self
.
getPortalObject
().
portal_url
.
getRelativeUrl
def
cleanupCategory
(
path
):
def
cleanupCategory
(
path
):
# prevent duplicating base categories and storing "portal_categories/"
# prevent duplicating base categories and storing "portal_categories/"
for
start_string
in
(
"portal_categories/"
,
"%s/"
%
id
):
for
start_string
in
(
"portal_categories/"
,
"%s/"
%
id
):
...
@@ -3195,13 +3195,14 @@ class Base( CopyContainer,
...
@@ -3195,13 +3195,14 @@ class Base( CopyContainer,
pass
pass
else
:
else
:
max_date
=
None
max_date
=
None
for
history
in
history_list
.
itervalues
():
portal_workflow
=
getToolByName
(
self
.
getPortalObject
(),
'portal_workflow'
)
try
:
getStatusOf
=
portal_workflow
.
getStatusOf
date
=
history
[
-
1
][
'time'
]
for
key
,
_
in
history_list
.
iteritems
():
except
(
IndexError
,
KeyError
,
TypeError
):
status
=
getStatusOf
(
key
,
self
)
continue
if
status
is
not
None
and
status
.
has_key
(
'time'
):
if
date
>
max_date
:
date
=
status
[
'time'
]
max_date
=
date
if
date
>
max_date
:
max_date
=
date
if
max_date
:
if
max_date
:
# Return a copy of history time, to prevent modification
# Return a copy of history time, to prevent modification
return
DateTime
(
max_date
)
return
DateTime
(
max_date
)
...
...
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