From 5f5a0c764cb4424257a50291612bf709bbcdec16 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Fri, 16 Jun 2017 14:50:26 +0200 Subject: [PATCH] Always return a timedelta for product supply_period issue6570 review35451002 --- product.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product.py b/product.py index ef10cecf49..ee82a9a33d 100644 --- a/product.py +++ b/product.py @@ -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)