Always return a timedelta for product supply_period

issue6570
review35451002
This commit is contained in:
Sergi Almacellas Abellana committed 2017-06-16 14:50:26 +02:00
1 parent 9090ad57d7
commit 5f5a0c764c
1 file changed
+2 -1
+2 -1
View File
@@ -1,5 +1,6 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from datetime import timedelta
from trytond.pool import Pool, PoolMeta
@@ -14,4 +15,4 @@ class Product:
'Return the supply period for the product'
pool = Pool()
Configuration = pool.get('production.configuration')
return Configuration(1).supply_period or 0
return Configuration(1).supply_period or timedelta(0)