Migrate to py3

This commit is contained in:
Raimon Esteve 2018-09-15 18:08:52 +02:00
parent 0f52298115
commit 69ade72909
4 changed files with 6 additions and 19 deletions

14
api.py
View File

@ -1,23 +1,15 @@
# This file is part of the carrier_send_shipments_seurvalencia module for Tryton. # This file is part of the carrier_send_shipments_seurvalencia module for Tryton.
# The COPYRIGHT file at the top level of this repository contains the full # The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms. # copyright notices and license terms.
import logging
from trytond.pool import PoolMeta from trytond.pool import PoolMeta
from trytond.pyson import Eval, Not, Equal from trytond.pyson import Eval, Not, Equal
import logging from seurvalencia.picking import *
try:
from seurvalencia.picking import *
except ImportError:
logger = logging.getLogger(__name__)
message = 'Install Seur: pip install seurvalencia'
logger.error(message)
raise Exception(message)
__all__ = ['CarrierApi'] __all__ = ['CarrierApi']
class CarrierApi: class CarrierApi(metaclass=PoolMeta):
__metaclass__ = PoolMeta
__name__ = 'carrier.api' __name__ = 'carrier.api'
@classmethod @classmethod

View File

@ -9,8 +9,7 @@ from base64 import decodestring
__all__ = ['CarrierManifest'] __all__ = ['CarrierManifest']
class CarrierManifest: class CarrierManifest(metaclass=PoolMeta):
__metaclass__ = PoolMeta
__name__ = 'carrier.manifest' __name__ = 'carrier.manifest'
def get_manifest_seurvalencia(self, api, from_date, to_date): def get_manifest_seurvalencia(self, api, from_date, to_date):

View File

@ -7,10 +7,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
MODULE2PREFIX = {} MODULE2PREFIX = {}

View File

@ -13,8 +13,7 @@ __all__ = ['ShipmentOut']
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class ShipmentOut: class ShipmentOut(metaclass=PoolMeta):
__metaclass__ = PoolMeta
__name__ = 'stock.shipment.out' __name__ = 'stock.shipment.out'
@classmethod @classmethod