Method compute_supply_date returns 1 date

compute_supply_date used to return 2 dates, 1 for the supply date
and 1 for the next date.
Now it returns only the supply date

issue 2300
review 184001
This commit is contained in:
Nathanael Perat committed 2011-11-29 18:26:26 +01:00
1 parent c1000b0d90
commit 4fbe87bcc5
2 files changed
+5 -5

No files matched your search

+2
View File
@@ -1,3 +1,5 @@
* compute_supply_date returns only one date
Version 2.2.0 - 2011-10-25
* Bug fixes (see mercurial logs for details)
+3 -5
View File
@@ -1302,7 +1302,7 @@ class PurchaseLine(ModelSQL, ModelView):
vals['planned_date'] = \
product_supplier_obj.compute_supply_date(
product_supplier,
date=line.purchase.purchase_date)[0]
date=line.purchase.purchase_date)
break
with Transaction().set_user(0, set_context=True):
@@ -1562,15 +1562,13 @@ class ProductSupplier(ModelSQL, ModelView):
:param product_supplier: a BrowseRecord of the Product Supplier
:param date: the date of the purchase if None the current date
:return: a tuple with the supply date and the next one
:return: the supply date
'''
date_obj = Pool().get('ir.date')
if not date:
date = date_obj.today()
next_date = date + datetime.timedelta(1)
return (date + datetime.timedelta(product_supplier.delivery_time),
next_date + datetime.timedelta(product_supplier.delivery_time))
return date + datetime.timedelta(product_supplier.delivery_time)
def compute_purchase_date(self, product_supplier, date):
'''