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
Cédric Le Ninivin
erp5
Commits
8f7033f4
Commit
8f7033f4
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
a9942a4a
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 @
8f7033f4
...
...
@@ -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