mirror of
https://github.com/NaN-tic/trytond-stock_lot_jreport.git
synced 2023-12-14 03:53:01 +01:00
Migrate to python 3
This commit is contained in:
parent
1a66d54887
commit
9ee851cab3
4
setup.py
4
setup.py
|
@ -4,7 +4,7 @@
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import ConfigParser
|
import configparser
|
||||||
|
|
||||||
MODULE = 'stock_lot_jreport'
|
MODULE = 'stock_lot_jreport'
|
||||||
PREFIX = 'nantic'
|
PREFIX = 'nantic'
|
||||||
|
@ -14,7 +14,7 @@ MODULE2PREFIX = {}
|
||||||
def read(fname):
|
def read(fname):
|
||||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||||
|
|
||||||
config = ConfigParser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.readfp(open('tryton.cfg'))
|
config.readfp(open('tryton.cfg'))
|
||||||
info = dict(config.items('tryton'))
|
info = dict(config.items('tryton'))
|
||||||
for key in ('depends', 'extras_depend', 'xml'):
|
for key in ('depends', 'extras_depend', 'xml'):
|
||||||
|
|
3
stock.py
3
stock.py
|
@ -10,8 +10,7 @@ from dateutil.relativedelta import relativedelta
|
||||||
__all__ = ['Lot', 'LotReport']
|
__all__ = ['Lot', 'LotReport']
|
||||||
|
|
||||||
|
|
||||||
class Lot:
|
class Lot(metaclass=PoolMeta):
|
||||||
__metaclass__ = PoolMeta
|
|
||||||
__name__ = 'stock.lot'
|
__name__ = 'stock.lot'
|
||||||
|
|
||||||
lag_quantity = fields.Function(fields.Float('Lag Quantity'),
|
lag_quantity = fields.Function(fields.Float('Lag Quantity'),
|
||||||
|
|
Loading…
Reference in a new issue