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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
40426c0d
Commit
40426c0d
authored
Oct 27, 2017
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item: use brain attributes in Item_getTrackingList
no need to do catalog here
parent
e3e7f960
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
19 deletions
+14
-19
bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getTrackingList.py
...mplateItem/portal_skins/erp5_item/Item_getTrackingList.py
+14
-19
No files found.
bt5/erp5_item/SkinTemplateItem/portal_skins/erp5_item/Item_getTrackingList.py
View file @
40426c0d
from
Products.ERP5Type.Document
import
newTempBase
portal
=
context
.
getPortalObject
()
catalog
=
portal
.
portal_catalog
.
getResultValue
if
current
:
method
=
portal
.
portal_simulation
.
getCurrentTrackingList
else
:
method
=
portal
.
portal_simulation
.
getTrackingList
uid
=
context
.
getUid
()
history_list
=
[]
for
res
in
method
(
aggregate_uid
=
uid
,
**
kw
):
history_list
=
[]
for
brain
in
method
(
aggregate_uid
=
context
.
getUid
(),
**
kw
):
history
=
newTempBase
(
context
,
str
(
len
(
history_list
)))
explanation
=
catalog
(
uid
=
res
.
delivery_uid
)
node_value
=
catalog
(
uid
=
res
.
node_uid
)
section_value
=
catalog
(
uid
=
res
.
section_uid
)
resource_value
=
catalog
(
uid
=
res
.
resource_uid
)
explanation
=
brain
.
getExplanationValue
()
date
=
brain
.
getDate
()
history
.
edit
(
#uid = catalog(uid=res.uid).getTitle(),
date
=
res
.
getDate
(),
node_title
=
node_value
is
not
None
and
node_value
.
getTitle
()
or
None
,
date
=
date
,
node_title
=
brain
.
node_title
,
source_title
=
explanation
.
getSourceTitle
(),
section_title
=
section_value
is
not
None
and
section_value
.
getTitle
()
or
Non
e
,
resource_title
=
resource_value
is
not
None
and
resource_value
.
getTitle
()
or
Non
e
,
section_title
=
brain
.
section_titl
e
,
resource_title
=
brain
.
resource_titl
e
,
explanation
=
explanation
.
getTitle
(),
translated_portal_type
=
explanation
.
getTranslatedPortalType
(),
quantity
=
explanation
.
getQuantity
(),
translated_portal_type
=
explanation
.
getTranslatedPortalType
(),
quantity
=
explanation
.
getQuantity
(),
url
=
explanation
.
absolute_url
(),
item_quantity
=
context
.
getQuantity
(
at_date
=
res
.
getDate
()),
variation_category_item_list
=
[
x
[
0
]
for
x
in
explanation
.
getVariationCategoryItemList
()],
item_quantity
=
context
.
getQuantity
(
at_date
=
date
),
variation_category_item_list
=
[
x
[
0
]
for
x
in
explanation
.
getVariationCategoryItemList
()],
simulation_state
=
explanation
.
getTranslatedSimulationStateTitle
(),
)
history_list
.
append
(
history
)
return
history_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