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
This commit is contained in:
P. Christeas 2010-10-19 10:36:28 +03:00
parent 2f751b3baf
commit ddb8793c9b
1 changed files with 1 additions and 1 deletions

View File

@ -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 = {