Migrate to py3
This commit is contained in:
parent
b30484d9dc
commit
e59e421726
|
@ -1,7 +1,6 @@
|
|||
# This file is part of product_special_price module for Tryton.
|
||||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
|
||||
from trytond.pool import Pool
|
||||
from . import shop
|
||||
from . import product
|
||||
|
|
|
@ -19,8 +19,7 @@ STATES = {
|
|||
DEPENDS = ['active']
|
||||
|
||||
|
||||
class Template:
|
||||
__metaclass__ = PoolMeta
|
||||
class Template(metaclass=PoolMeta):
|
||||
__name__ = 'product.template'
|
||||
special_price = fields.MultiValue(fields.Numeric(
|
||||
"Special Price", digits=price_digits,
|
||||
|
@ -41,7 +40,6 @@ class Template:
|
|||
class ProductSpecialPrice(ModelSQL, CompanyValueMixin):
|
||||
"Product Special Price"
|
||||
__name__ = 'product.special_price'
|
||||
|
||||
template = fields.Many2One(
|
||||
'product.template', "Template", ondelete='CASCADE', select=True)
|
||||
special_price = fields.Numeric("Special Price", digits=price_digits)
|
||||
|
@ -66,8 +64,7 @@ class ProductSpecialPrice(ModelSQL, CompanyValueMixin):
|
|||
parent='template', fields=fields)
|
||||
|
||||
|
||||
class Product:
|
||||
__metaclass__ = PoolMeta
|
||||
class Product(metaclass=PoolMeta):
|
||||
__name__ = 'product.product'
|
||||
|
||||
@classmethod
|
||||
|
|
5
setup.py
5
setup.py
|
@ -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 = 'product_special_price'
|
||||
PREFIX = 'trytonzz'
|
||||
|
|
4
shop.py
4
shop.py
|
@ -8,10 +8,8 @@ from trytond.pyson import Eval
|
|||
__all__ = ['SaleShop']
|
||||
|
||||
|
||||
class SaleShop:
|
||||
__metaclass__ = PoolMeta
|
||||
class SaleShop(metaclass=PoolMeta):
|
||||
__name__ = 'sale.shop'
|
||||
|
||||
special_price = fields.Boolean('Apply Special Price')
|
||||
type_special_price = fields.Selection([
|
||||
('price', 'Special Price'),
|
||||
|
|
Loading…
Reference in New Issue