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
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
erp5
Commits
e6ad0edb
Commit
e6ad0edb
authored
Mar 15, 2019
by
Cédric Le Ninivin
Committed by
Klaus Wölfel
Apr 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder mixin: take into account supply start date even if it is defined on line
parent
8f021d0d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
...TemplateItem/portal_components/mixin.erp5.BuilderMixin.py
+7
-1
No files found.
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
View file @
e6ad0edb
...
@@ -431,6 +431,12 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -431,6 +431,12 @@ class BuilderMixin(XMLObject, Amount, Predicate):
for
brain
in
previous_movement_list
:
for
brain
in
previous_movement_list
:
brain
.
getObject
().
setQuantity
(
0
)
brain
.
getObject
().
setQuantity
(
0
)
# Calculate first possible shipment:
first_shipment_date
=
max
(
supply
.
getStartDateRangeMin
(),
supply
.
getParentValue
().
getStartDateRangeMin
()
)
# Prepare history list to work with
# Prepare history list to work with
history_list
=
resource_value
.
Resource_getInventoryHistoryList
(
history_list
=
resource_value
.
Resource_getInventoryHistoryList
(
from_date
=
from_date
,
from_date
=
from_date
,
...
@@ -535,7 +541,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -535,7 +541,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
# XXX CLN This is very naive, it has to be optimized
# XXX CLN This is very naive, it has to be optimized
if
start_date
>
supply
.
getStartDateRangeMax
():
if
start_date
>
supply
.
getStartDateRangeMax
():
break
break
if
start_date
<
supply
.
getStartDateRangeMin
()
:
if
start_date
<
first_shipment_date
:
# As we are going to need to go further in time to check if new Movements are needed
# As we are going to need to go further in time to check if new Movements are needed
# we need to keep inventory correct
# we need to keep inventory correct
#future_inventory_to_date += quantity
#future_inventory_to_date += quantity
...
...
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