Migrate to python 3
This commit is contained in:
parent
1eb3240e9e
commit
1051badaf9
5
setup.py
5
setup.py
|
@ -5,10 +5,7 @@ from setuptools import setup
|
|||
import re
|
||||
import os
|
||||
import io
|
||||
try:
|
||||
from configparser import ConfigParser
|
||||
except ImportError:
|
||||
from ConfigParser import ConfigParser
|
||||
from configparser import ConfigParser
|
||||
|
||||
MODULE = 'stock_lot_quantity'
|
||||
PREFIX = 'nantic'
|
||||
|
|
6
stock.py
6
stock.py
|
@ -7,9 +7,8 @@ from trytond.transaction import Transaction
|
|||
__all__ = ['Lot', 'Move']
|
||||
|
||||
|
||||
class Lot:
|
||||
class Lot(metaclass=PoolMeta):
|
||||
__name__ = 'stock.lot'
|
||||
__metaclass__ = PoolMeta
|
||||
|
||||
@classmethod
|
||||
def get_quantity(cls, lots, name):
|
||||
|
@ -19,9 +18,8 @@ class Lot:
|
|||
return super(Lot, cls).get_quantity(lots, name)
|
||||
|
||||
|
||||
class Move():
|
||||
class Move(metaclass=PoolMeta):
|
||||
__name__ = 'stock.move'
|
||||
__metaclass__ = PoolMeta
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
|
|
Loading…
Reference in New Issue