mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
Fix qty return by estimate
This commit is contained in:
committed by
Jordi Ballester Alomar
parent
43079b41d8
commit
671b69a37f
@@ -77,8 +77,7 @@ class StockDemandEstimate(models.Model):
|
||||
|
||||
# We need only the periods that overlap
|
||||
# the dates introduced by the user.
|
||||
if (date_start <= period_date_start <= date_end or date_start <=
|
||||
period_date_end <= date_end):
|
||||
if period_date_start <= date_end and period_date_end >= date_start:
|
||||
overlap_date_start = max(period_date_start, date_start)
|
||||
overlap_date_end = min(period_date_end, date_end)
|
||||
days = (abs(overlap_date_end-overlap_date_start)).days + 1
|
||||
|
||||
Reference in New Issue
Block a user