Enforce today date for delivery date computation
This commit is contained in:
1 parent
ba2831d42d
commit
1769ee7084
1 file changed
+2
-1
+2
-1
@@ -174,11 +174,12 @@ class GeneratePurchaseRequest(Wizard):
|
||||
"""
|
||||
min_date = None
|
||||
max_date = None
|
||||
today = datetime.date.today()
|
||||
product_supplier_obj = self.pool.get('purchase.product_supplier')
|
||||
|
||||
for product_supplier in product.product_suppliers:
|
||||
supply_date = product_supplier_obj.compute_supply_date(
|
||||
cursor, user, product_supplier, context=context)
|
||||
cursor, user, product_supplier, date=today, context=context)
|
||||
if (not min_date) or supply_date < min_date:
|
||||
min_date = supply_date
|
||||
if (not max_date) or supply_date > max_date:
|
||||
|
||||
Reference in new issue
Block a user