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.
# The COPYRIGHT file at the top level of this repository contains the full
# copyright notices and license terms.
import logging
from trytond.pool import PoolMeta
from trytond.pyson import Eval, Not, Equal
import logging
try:
from seurvalencia.picking import *
except ImportError:
logger = logging.getLogger(__name__)
message = 'Install Seur: pip install seurvalencia'
logger.error(message)
raise Exception(message)
from seurvalencia.picking import *
__all__ = ['CarrierApi']
class CarrierApi:
__metaclass__ = PoolMeta
class CarrierApi(metaclass=PoolMeta):
__name__ = 'carrier.api'
@classmethod

View File

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

View File

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

View File

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