If not delivery_time set purchase date to today

This commit is contained in:
Cédric Krier committed 2008-10-01 13:10:25 +02:00
1 parent 1e59b4de99
commit a6e77b7413
1 file changed
+2
+2
View File
@@ -1272,6 +1272,8 @@ class ProductSupplier(OSV):
:param context: the context
:return: the purchase date
'''
if not product_supplier.delivery_time:
return datetime.date.today()
return date - datetime.timedelta(product_supplier.delivery_time)
ProductSupplier()