Migrate to python 3.

This commit is contained in:
Albert Cervera i Areny 2018-08-18 12:05:11 +02:00
parent 90729a0798
commit cfdb082549
6 changed files with 7 additions and 16 deletions

View File

@ -4,8 +4,7 @@
from trytond.pool import PoolMeta
__all__ = ['Commission']
class Commission:
__metaclass__ = PoolMeta
class Commission(metaclass=PoolMeta):
__name__ = 'commission'
@classmethod

View File

@ -11,8 +11,7 @@ __all__ = ['Invoice']
ZERO = Decimal('0.0')
class Invoice:
__metaclass__ = PoolMeta
class Invoice(metaclass=PoolMeta):
__name__ = 'account.invoice'
payment_type_kind = fields.Function(fields.Selection(KINDS,
'Kind of payment type',

View File

@ -9,8 +9,7 @@ from trytond.transaction import Transaction
__all__ = ['Move', 'Line']
class Move:
__metaclass__ = PoolMeta
class Move(metaclass=PoolMeta):
__name__ = 'account.move'
def cancel(self, default=None):
@ -18,8 +17,7 @@ class Move:
return super(Move, self).cancel(default=default)
class Line:
__metaclass__ = PoolMeta
class Line(metaclass=PoolMeta):
__name__ = 'account.move.line'
account_kind = fields.Function(fields.Selection([

View File

@ -27,8 +27,7 @@ class PartyAccountPaymentType(CompanyValueMixin, ModelSQL):
supplier_payment_type = supplier_payment_type
class Party:
__metaclass__ = PoolMeta
class Party(metaclass=PoolMeta):
__name__ = 'party.party'
customer_payment_type = fields.MultiValue(customer_payment_type)

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
MODULE = 'account_payment_type'
PREFIX = 'trytonspain'

View File

@ -6,8 +6,7 @@ from trytond.pool import PoolMeta
__all__ = ['Work']
class Work:
__metaclass__ = PoolMeta
class Work(metaclass=PoolMeta):
__name__ = 'project.work'
def _get_invoice(self):