Add python 3 support

This commit is contained in:
jmartin 2016-03-29 12:00:24 +02:00
parent 666380603a
commit 7f5c26811a
6 changed files with 9 additions and 6 deletions

View File

@ -7,10 +7,10 @@ from trytond.transaction import Transaction
from trytond.pyson import Eval
__all__ = ['GalateaWebSite', 'GalateaUser']
__metaclass__ = PoolMeta
class GalateaWebSite:
__metaclass__ = PoolMeta
__name__ = "galatea.website"
esale_menu = fields.Many2One('esale.catalog.menu', 'Main Menu', required=True,
help='Main menu product catalog')
@ -30,6 +30,7 @@ class GalateaWebSite:
class GalateaUser:
__metaclass__ = PoolMeta
__name__ = "galatea.user"
invoice_address = fields.Many2One('party.address', 'Invoice Address',
domain=[('party', '=', Eval('party')), ('invoice', '=', True)],

View File

@ -5,10 +5,10 @@ from trytond.model import fields
from trytond.pool import PoolMeta
__all__ = ['CatalogMenu']
__metaclass__ = PoolMeta
class CatalogMenu:
__metaclass__ = PoolMeta
__name__ = 'esale.catalog.menu'
website = fields.Many2One('galatea.website', 'Website')

View File

@ -6,10 +6,10 @@ from trytond.pool import PoolMeta
from trytond.pyson import Eval
__all__ = ['PaymentType']
__metaclass__ = PoolMeta
class PaymentType:
__metaclass__ = PoolMeta
__name__ = 'account.payment.type'
esale_payment = fields.Boolean('Virtual Payment')
esale_code = fields.Char('Code App Payment', states={

View File

@ -8,12 +8,12 @@ from trytond.transaction import Transaction
from trytond.config import config as config_
__all__ = ['Template', 'Product']
__metaclass__ = PoolMeta
DIGITS = config_.getint('product', 'price_decimal', default=4)
class Template:
__metaclass__ = PoolMeta
__name__ = 'product.template'
esale_new = fields.Boolean('New', help='Icon New product')
esale_hot = fields.Boolean('Hot', help='Icon Hot product')
@ -52,6 +52,7 @@ class Template:
class Product:
__metaclass__ = PoolMeta
__name__ = 'product.product'
add_cart = fields.Boolean('Add Cart', states={
'readonly': ~Eval('active', True),

View File

@ -6,10 +6,10 @@ from trytond.model import fields
from trytond.pyson import Eval, Not, Bool, And
__all__ = ['Sale', 'SaleLine']
__metaclass__ = PoolMeta
class Sale:
__metaclass__ = PoolMeta
__name__ = 'sale.sale'
galatea_user = fields.Many2One('galatea.user', 'Galatea User',
readonly=True)
@ -25,6 +25,7 @@ class Sale:
class SaleLine:
__metaclass__ = PoolMeta
__name__ = 'sale.line'
sid = fields.Char('Session')
galatea_user = fields.Many2One('galatea.user', 'Galatea User', readonly=True)

View File

@ -4,10 +4,10 @@
from trytond.pool import PoolMeta
__all__ = ['SaleShop']
__metaclass__ = PoolMeta
class SaleShop:
__metaclass__ = PoolMeta
__name__ = 'sale.shop'
@classmethod