Migarte to python 3

This commit is contained in:
Albert Cervera i Areny 2018-10-28 12:33:51 +01:00
parent 852a77eccd
commit ad769b4ad8
2 changed files with 4 additions and 6 deletions

View File

@ -4,7 +4,7 @@
from setuptools import setup
import re
import os
import ConfigParser
import configparser
MODULE = 'stock_shipment_prevent_cancel'
PREFIX = 'nantic'
@ -24,7 +24,7 @@ def get_require_version(name):
major_version, minor_version + 1)
return require
config = ConfigParser.ConfigParser()
config = configparser.ConfigParser()
config.readfp(open('tryton.cfg'))
info = dict(config.items('tryton'))
for key in ('depends', 'extras_depend', 'xml'):

View File

@ -6,8 +6,7 @@ from trytond.pyson import Eval
__all__ = ['ShipmentIn', 'ShipmentOut']
class ShipmentIn:
__metaclass__ = PoolMeta
class ShipmentIn(metaclass=PoolMeta):
__name__ = 'stock.shipment.in'
@classmethod
@ -17,8 +16,7 @@ class ShipmentIn:
cancel['invisible'] |= Eval('state') == 'received'
class ShipmentOut:
__metaclass__ = PoolMeta
class ShipmentOut(metaclass=PoolMeta):
__name__ = 'stock.shipment.out'
@classmethod