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
Sven Franck
erp5
Commits
603b4ddf
Commit
603b4ddf
authored
Mar 07, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support the newest effective Open Order related to Item.
parent
114b7d9c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
product/ERP5/Document/SubscriptionItem.py
product/ERP5/Document/SubscriptionItem.py
+7
-8
No files found.
product/ERP5/Document/SubscriptionItem.py
View file @
603b4ddf
...
@@ -270,15 +270,14 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, Periodici
...
@@ -270,15 +270,14 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, Periodici
result
=
[]
result
=
[]
catalog_tool
=
getToolByName
(
self
,
'portal_catalog'
)
catalog_tool
=
getToolByName
(
self
,
'portal_catalog'
)
# Try to find the source open order
open_order_movement_list
=
self
.
getAggregateRelatedValueList
(
portal_type
=
"Open Sale Order Line"
)
# XXX-JPS Hard Coded
if
not
open_order_movement_list
:
return
result
# Now generate movements for each valid open order
# Now generate movements for each valid open order
for
movement
in
open_order_movement_list
:
# YXU-Why we have a list here?
for
movement
in
catalog_tool
(
portal_type
=
"Open Sale Order Line"
,
if
movement
.
getParentValue
().
getValidationState
()
in
(
'open'
,
'validated'
):
# XXX-JPS hard coding
default_aggregate_uid
=
self
.
getUid
(),
validation_state
=
(
'open'
,
'validated'
,
'archived'
),
# XXX-JPS hard coding
sort_on
=
((
'effective_date'
,
'descending'
),),
limit
=
1
# Note Luke: Support the newest Open Order which defines
# something for current subscription item
):
# YXU-Why we have a list here?
resource
=
movement
.
getResource
()
resource
=
movement
.
getResource
()
start_date
=
movement
.
getStartDate
()
start_date
=
movement
.
getStartDate
()
stop_date
=
movement
.
getStopDate
()
stop_date
=
movement
.
getStopDate
()
...
...
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