From ca88fcc069eea6ddf14be5a287dbca989b6c7b83 Mon Sep 17 00:00:00 2001 From: jmartin Date: Tue, 29 Mar 2016 12:00:33 +0200 Subject: [PATCH] Add python 3 support --- product.py | 3 ++- shop.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/product.py b/product.py index 90d07ec..4152239 100644 --- a/product.py +++ b/product.py @@ -8,7 +8,6 @@ from trytond.transaction import Transaction from trytond.config import config as config_ __all__ = ['Template', 'Product'] -__metaclass__ = PoolMeta STATES = { 'readonly': ~Eval('active', True), @@ -18,6 +17,7 @@ DIGITS = config_.getint('product', 'price_decimal', default=4) class Template: + __metaclass__ = PoolMeta __name__ = 'product.template' special_price = fields.Property(fields.Numeric('Special Price', states=STATES, digits=(16, DIGITS), depends=DEPENDS)) @@ -26,6 +26,7 @@ class Template: class Product: + __metaclass__ = PoolMeta __name__ = 'product.product' @classmethod diff --git a/shop.py b/shop.py index f364696..626c724 100644 --- a/shop.py +++ b/shop.py @@ -6,10 +6,10 @@ from trytond.model import fields from trytond.pyson import Eval __all__ = ['SaleShop'] -__metaclass__ = PoolMeta class SaleShop: + __metaclass__ = PoolMeta __name__ = 'sale.shop' special_price = fields.Boolean('Apply Special Price')