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
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
af64e340
Commit
af64e340
authored
May 02, 2018
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder: Supply builder do not create movement for resources that won't be consumed in the future
parent
71773321
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
product/ERP5/mixin/builder.py
product/ERP5/mixin/builder.py
+11
-0
No files found.
product/ERP5/mixin/builder.py
View file @
af64e340
...
...
@@ -425,6 +425,17 @@ class BuilderMixin(XMLObject, Amount, Predicate):
)
#self.log("history_list len: %s" % len(history_list))
# We only consider resources that have consumption movements in
# the future, for those who don't we do not build anything.
has_consumption_movement
=
False
for
date
,
inventory
,
quantity
,
portal_type
in
history_list
:
if
quantity
<
0
:
has_consumption_movement
=
True
break
if
not
has_consumption_movement
:
return
[]
# evaluate future inventory at date
future_inventory_to_date
=
portal
.
portal_simulation
.
getFutureInventory
(
to_date
=
from_date
,
...
...
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