From ddb8793c9be33c49c8e60b82cfe28b6ec4961d15 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Tue, 19 Oct 2010 10:36:28 +0300 Subject: [PATCH] product_expiry: return False as default for unknown dates This /might/ solve a problem with fields_view_get(). bzr revid: p_christ@hol.gr-20101019073628-538wuaxmipzcvjxb --- addons/product_expiry/product_expiry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product_expiry/product_expiry.py b/addons/product_expiry/product_expiry.py index fbfa7dc1610..01ce50dead8 100644 --- a/addons/product_expiry/product_expiry.py +++ b/addons/product_expiry/product_expiry.py @@ -40,7 +40,7 @@ class stock_production_lot(osv.osv): # set date to False when no expiry time specified on the product date = duration and (datetime.datetime.today() + datetime.timedelta(days=duration)) - return date and date.strftime('%Y-%m-%d %H:%M:%S') + return date and date.strftime('%Y-%m-%d %H:%M:%S') or False return calc_date _columns = {