Migrate to py3
This commit is contained in:
parent
0f52298115
commit
69ade72909
14
api.py
14
api.py
|
@ -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
|
||||||
|
|
|
@ -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):
|
||||||
|
|
5
setup.py
5
setup.py
|
@ -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 = {}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue