Do not minimize the supply dates interval
Since we use a configured supply period, we do not have to minimize the interval on which to compute the supply. issue11318 review366931003
This commit is contained in:
1 parent
1bd41fa405
commit
8090ea5c66
1 file changed
+2
-6
+2
-6
@@ -213,7 +213,7 @@ class PurchaseRequest(metaclass=PoolMeta):
|
||||
@classmethod
|
||||
def get_supply_dates(cls, product, **pattern):
|
||||
"""
|
||||
Return the minimal interval of earliest supply dates for a product.
|
||||
Return the interval of earliest supply dates for a product.
|
||||
"""
|
||||
Date = Pool().get('ir.date')
|
||||
|
||||
@@ -228,11 +228,7 @@ class PurchaseRequest(metaclass=PoolMeta):
|
||||
date=next_day)
|
||||
if (not min_date) or supply_date < min_date:
|
||||
min_date = supply_date
|
||||
if (not max_date):
|
||||
max_date = next_supply_date
|
||||
if supply_date > min_date and supply_date < max_date:
|
||||
max_date = supply_date
|
||||
if next_supply_date < max_date:
|
||||
if (not max_date) or next_supply_date > max_date:
|
||||
max_date = next_supply_date
|
||||
|
||||
if not min_date:
|
||||
|
||||
Reference in new issue
Block a user