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
b27c3048
Commit
b27c3048
authored
Feb 18, 2019
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
Mar 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder: Supply builder Fix calculation of initial stock
parent
ac00359f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
...TemplateItem/portal_components/mixin.erp5.BuilderMixin.py
+3
-4
No files found.
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
View file @
b27c3048
...
@@ -451,15 +451,14 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -451,15 +451,14 @@ class BuilderMixin(XMLObject, Amount, Predicate):
return
[]
return
[]
from_date
=
date
from_date
=
date
# Prepare period_list
limit_date
=
getPreviousValidDate
(
getPreviousValidDate
(
from_date
)
-
0.1
)
# evaluate future inventory at date
# evaluate future inventory at date
future_inventory_to_date
=
portal
.
portal_simulation
.
getFutureInventory
(
future_inventory_to_date
=
portal
.
portal_simulation
.
getFutureInventory
(
to_date
=
from
_date
,
to_date
=
limit
_date
,
resource_uid
=
resource_value
.
getUid
(),
resource_uid
=
resource_value
.
getUid
(),
node_uid
=
supply
.
getDestinationUid
(),
node_uid
=
supply
.
getDestinationUid
(),
)
)
# Prepare period_list
limit_date
=
getPreviousValidDate
(
getPreviousValidDate
(
from_date
)
-
0.1
)
limit_date_list
=
[]
limit_date_list
=
[]
last_date
=
getPreviousValidDate
(
history_list
[
-
1
][
0
])
last_date
=
getPreviousValidDate
(
history_list
[
-
1
][
0
])
while
limit_date
<=
last_date
:
while
limit_date
<=
last_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