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
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
Léo-Paul Géneau
erp5
Commits
481c9d45
Commit
481c9d45
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
39f3b002
Changes
1
Show 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 @
481c9d45
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
(),
)
...
...
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