diff --git a/product.py b/product.py index 2f31370e60..ef10cecf49 100644 --- a/product.py +++ b/product.py @@ -14,4 +14,4 @@ class Product: 'Return the supply period for the product' pool = Pool() Configuration = pool.get('production.configuration') - return int(Configuration(1).supply_period or 0) + return Configuration(1).supply_period or 0 diff --git a/production.py b/production.py index ab39fdd25e..eb09e11460 100644 --- a/production.py +++ b/production.py @@ -1,7 +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. import datetime -from decimal import Decimal from collections import defaultdict from trytond.model import ModelView, fields @@ -17,12 +16,12 @@ __all__ = ['Configuration', 'Production', class Configuration: __metaclass__ = PoolMeta __name__ = 'production.configuration' - supply_period = fields.Property(fields.Numeric('Supply Period', - digits=(16, 0), help='In number of days', required=True)) + supply_period = fields.Property(fields.Integer('Supply Period', + help='In number of days', required=True)) - @staticmethod - def default_supply_period(): - return Decimal(0) + @classmethod + def default_supply_period(cls): + return 0 class Production: