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 (grafted from e78dd7305c95c6b752342ee4aba8ec3406b1ef19) --HG-- branch : 6.0
This commit is contained in:
1 parent
636f890afd
commit
627e4a435d
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