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
6e6f19f5
Commit
6e6f19f5
authored
Jan 26, 2018
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder mixin: Take into account supply date range before create movement
parent
0ccbea5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
product/ERP5/mixin/builder.py
product/ERP5/mixin/builder.py
+11
-8
No files found.
product/ERP5/mixin/builder.py
View file @
6e6f19f5
...
@@ -395,15 +395,18 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -395,15 +395,18 @@ class BuilderMixin(XMLObject, Amount, Predicate):
if
ordered_inventory
+
inventory
<
min_inventory
:
# SKU
if
ordered_inventory
+
inventory
<
min_inventory
:
# SKU
quantity
=
min_inventory
-
inventory
-
ordered_inventory
quantity
=
min_inventory
-
inventory
-
ordered_inventory
ordered_quantity
,
ordered_unit
,
ordered_date
,
delivery_date
,
quantity
=
minimalQuantity
(
quantity
,
date
)
ordered_quantity
,
ordered_unit
,
ordered_date
,
delivery_date
,
quantity
=
minimalQuantity
(
quantity
,
date
)
ordered_inventory
=
ordered_inventory
+
quantity
# XXX CLN This is very naive, it has to be optimized
movement_list
.
append
(
if
ordered_date
<=
supply
.
getStartDateRangeMax
()
\
newMovement
(
and
ordered_date
>=
supply
.
getStartDateRangeMin
():
ordered_date
,
ordered_inventory
=
ordered_inventory
+
quantity
delivery_date
,
movement_list
.
append
(
ordered_quantity
,
newMovement
(
ordered_unit
ordered_date
,
delivery_date
,
ordered_quantity
,
ordered_unit
)
)
)
)
return
movement_list
return
movement_list
def
_searchMovementList
(
self
,
**
kw
):
def
_searchMovementList
(
self
,
**
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