diff --git a/setup.py b/setup.py index 0a47d62..42d4072 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup import re import os -import ConfigParser +import configparser MODULE = 'stock_lot_jreport' PREFIX = 'nantic' @@ -14,7 +14,7 @@ MODULE2PREFIX = {} def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -config = ConfigParser.ConfigParser() +config = configparser.ConfigParser() config.readfp(open('tryton.cfg')) info = dict(config.items('tryton')) for key in ('depends', 'extras_depend', 'xml'): diff --git a/stock.py b/stock.py index 2049f06..8b7d3e4 100644 --- a/stock.py +++ b/stock.py @@ -10,8 +10,7 @@ from dateutil.relativedelta import relativedelta __all__ = ['Lot', 'LotReport'] -class Lot: - __metaclass__ = PoolMeta +class Lot(metaclass=PoolMeta): __name__ = 'stock.lot' lag_quantity = fields.Function(fields.Float('Lag Quantity'),