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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
02b62e49
Commit
02b62e49
authored
Dec 05, 2012
by
Rafael Monnerat
Committed by
Xiaowu Zhang
Feb 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split aggregated Values when use splitAndDefer
parent
8e6f34ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
product/ERP5/TargetSolver/SplitAndDefer.py
product/ERP5/TargetSolver/SplitAndDefer.py
+11
-0
No files found.
product/ERP5/TargetSolver/SplitAndDefer.py
View file @
02b62e49
...
...
@@ -66,6 +66,9 @@ class SplitAndDefer(CopyToTarget):
# Adopt different dates for deferred movements
movement_dict
=
_getPropertyAndCategoryList
(
simulation_movement
)
# new properties
delivery
=
simulation_movement
.
getDeliveryValue
()
aggregate_set
=
set
(
simulation_movement
.
getAggregateList
())
aggregate_diff_set
=
aggregate_set
.
difference
(
delivery
.
getAggregateList
())
movement_dict
.
update
(
portal_type
=
"Simulation Movement"
,
id
=
new_id
,
...
...
@@ -98,7 +101,15 @@ class SplitAndDefer(CopyToTarget):
if
stop_date
is
not
None
:
new_movement
.
recordProperty
(
'stop_date'
)
new_movement
.
edit
(
stop_date
=
stop_date
)
new_movement
.
recordProperty
(
'aggregate'
)
new_movement
.
edit
(
aggregate_list
=
list
(
aggregate_diff_set
))
new_movement
.
activate
(
**
self
.
additional_parameters
).
expand
()
# Only update simulation movement if quantity was changed.
simulation_movement
.
recordProperty
(
'aggregate'
)
simulation_movement
.
edit
(
aggregate_list
=
delivery
.
getAggregateList
())
# adopt new quantity on original simulation movement
simulation_movement
.
edit
(
quantity
=
new_movement_quantity
)
simulation_movement
.
setDefaultActivateParameterDict
(
self
.
activate_kw
)
...
...
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