Migrate to python 3
This commit is contained in:
parent
47915d8df5
commit
f8687eebcf
3
bom.py
3
bom.py
|
@ -5,9 +5,8 @@ from trytond.pool import PoolMeta
|
||||||
__all__ = ['BOM', 'BOMDrawingLine']
|
__all__ = ['BOM', 'BOMDrawingLine']
|
||||||
|
|
||||||
|
|
||||||
class BOM:
|
class BOM(metaclass=PoolMeta):
|
||||||
__name__ = 'production.bom'
|
__name__ = 'production.bom'
|
||||||
__metaclass__ = PoolMeta
|
|
||||||
drawing = fields.Many2One('production.drawing', 'Drawing',
|
drawing = fields.Many2One('production.drawing', 'Drawing',
|
||||||
ondelete='RESTRICT')
|
ondelete='RESTRICT')
|
||||||
drawing_lines = fields.One2Many('production.bom.drawing.line',
|
drawing_lines = fields.One2Many('production.bom.drawing.line',
|
||||||
|
|
|
@ -5,9 +5,8 @@ from trytond.pool import PoolMeta, Pool
|
||||||
__all__ = ['Production', 'ProductionDrawingLine']
|
__all__ = ['Production', 'ProductionDrawingLine']
|
||||||
|
|
||||||
|
|
||||||
class Production:
|
class Production(metaclass=PoolMeta):
|
||||||
__name__ = 'production'
|
__name__ = 'production'
|
||||||
__metaclass__ = PoolMeta
|
|
||||||
drawing = fields.Many2One('production.drawing', 'Drawing',
|
drawing = fields.Many2One('production.drawing', 'Drawing',
|
||||||
ondelete='RESTRICT', states={
|
ondelete='RESTRICT', states={
|
||||||
'readonly': True,
|
'readonly': True,
|
||||||
|
|
5
setup.py
5
setup.py
|
@ -5,10 +5,7 @@ from setuptools import setup
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import io
|
import io
|
||||||
try:
|
from configparser import ConfigParser
|
||||||
from configparser import ConfigParser
|
|
||||||
except ImportError:
|
|
||||||
from ConfigParser import ConfigParser
|
|
||||||
|
|
||||||
MODULE = 'production_drawing'
|
MODULE = 'production_drawing'
|
||||||
PREFIX = 'nantic'
|
PREFIX = 'nantic'
|
||||||
|
|
Loading…
Reference in New Issue