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
1
Merge Requests
1
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
Vincent Bechu
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
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 @
481c9d45
from
Products.ERP5Type.Document
import
newTempBase
from
Products.ERP5Type.Document
import
newTempBase
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
catalog
=
portal
.
portal_catalog
.
getResultValue
if
current
:
if
current
:
method
=
portal
.
portal_simulation
.
getCurrentTrackingList
method
=
portal
.
portal_simulation
.
getCurrentTrackingList
else
:
else
:
method
=
portal
.
portal_simulation
.
getTrackingList
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
)))
history
=
newTempBase
(
context
,
str
(
len
(
history_list
)))
explanation
=
catalog
(
uid
=
res
.
delivery_uid
)
explanation
=
brain
.
getExplanationValue
()
node_value
=
catalog
(
uid
=
res
.
node_uid
)
date
=
brain
.
getDate
()
section_value
=
catalog
(
uid
=
res
.
section_uid
)
resource_value
=
catalog
(
uid
=
res
.
resource_uid
)
history
.
edit
(
history
.
edit
(
#uid = catalog(uid=res.uid).getTitle(),
date
=
date
,
date
=
res
.
getDate
(),
node_title
=
brain
.
node_title
,
node_title
=
node_value
is
not
None
and
node_value
.
getTitle
()
or
None
,
source_title
=
explanation
.
getSourceTitle
(),
source_title
=
explanation
.
getSourceTitle
(),
section_title
=
section_value
is
not
None
and
section_value
.
getTitle
()
or
Non
e
,
section_title
=
brain
.
section_titl
e
,
resource_title
=
resource_value
is
not
None
and
resource_value
.
getTitle
()
or
Non
e
,
resource_title
=
brain
.
resource_titl
e
,
explanation
=
explanation
.
getTitle
(),
explanation
=
explanation
.
getTitle
(),
translated_portal_type
=
explanation
.
getTranslatedPortalType
(),
translated_portal_type
=
explanation
.
getTranslatedPortalType
(),
quantity
=
explanation
.
getQuantity
(),
quantity
=
explanation
.
getQuantity
(),
url
=
explanation
.
absolute_url
(),
url
=
explanation
.
absolute_url
(),
item_quantity
=
context
.
getQuantity
(
at_date
=
res
.
getDate
()),
item_quantity
=
context
.
getQuantity
(
at_date
=
date
),
variation_category_item_list
=
[
x
[
0
]
for
x
in
explanation
.
getVariationCategoryItemList
()],
variation_category_item_list
=
[
x
[
0
]
for
x
in
explanation
.
getVariationCategoryItemList
()],
simulation_state
=
explanation
.
getTranslatedSimulationStateTitle
(),
simulation_state
=
explanation
.
getTranslatedSimulationStateTitle
(),
)
)
history_list
.
append
(
history
)
history_list
.
append
(
history
)
return
history_list
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