Migrate to py3
This commit is contained in:
parent
ff7d66435b
commit
56ed713a03
|
@ -9,8 +9,7 @@ from trytond.modules.product_esale.tools import slugify
|
||||||
__all__ = ['ProductOneClickView', 'ProductOneClick']
|
__all__ = ['ProductOneClickView', 'ProductOneClick']
|
||||||
|
|
||||||
|
|
||||||
class ProductOneClickView:
|
class ProductOneClickView(metaclass=PoolMeta):
|
||||||
__metaclass__ = PoolMeta
|
|
||||||
__name__ = 'product.oneclick.view'
|
__name__ = 'product.oneclick.view'
|
||||||
esale_available = fields.Boolean('Available eSale',
|
esale_available = fields.Boolean('Available eSale',
|
||||||
help='Product are available in e-commerce.')
|
help='Product are available in e-commerce.')
|
||||||
|
@ -21,7 +20,7 @@ class ProductOneClickView:
|
||||||
('catalog','Catalog'),
|
('catalog','Catalog'),
|
||||||
('none','None'),
|
('none','None'),
|
||||||
], 'Visibility')
|
], 'Visibility')
|
||||||
esale_slug = fields.Char('Slug',
|
esale_slug = fields.Char('Slug',
|
||||||
states={
|
states={
|
||||||
'required': Eval('esale_available', True),
|
'required': Eval('esale_available', True),
|
||||||
}, depends=['esale_available'])
|
}, depends=['esale_available'])
|
||||||
|
@ -47,7 +46,7 @@ class ProductOneClickView:
|
||||||
esale_metatitle = fields.Char('Meta Title')
|
esale_metatitle = fields.Char('Meta Title')
|
||||||
esale_menus = fields.Many2Many('product.template-esale.catalog.menu',
|
esale_menus = fields.Many2Many('product.template-esale.catalog.menu',
|
||||||
'template', 'menu', 'Menus')
|
'template', 'menu', 'Menus')
|
||||||
esale_relateds = fields.Many2Many('product.template-product.related',
|
esale_relateds = fields.Many2Many('product.template-product.related',
|
||||||
'template', 'related', 'Relateds',
|
'template', 'related', 'Relateds',
|
||||||
domain=[
|
domain=[
|
||||||
('id', '!=', Eval('id')),
|
('id', '!=', Eval('id')),
|
||||||
|
@ -68,7 +67,7 @@ class ProductOneClickView:
|
||||||
('esale_available', '=', True),
|
('esale_available', '=', True),
|
||||||
('salable', '=', True),
|
('salable', '=', True),
|
||||||
], depends=['id'])
|
], depends=['id'])
|
||||||
esale_sequence = fields.Integer('Sequence',
|
esale_sequence = fields.Integer('Sequence',
|
||||||
help='Gives the sequence order when displaying category list.')
|
help='Gives the sequence order when displaying category list.')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -94,8 +93,7 @@ class ProductOneClickView:
|
||||||
})]
|
})]
|
||||||
|
|
||||||
|
|
||||||
class ProductOneClick:
|
class ProductOneClick(metaclass=PoolMeta):
|
||||||
__metaclass__ = PoolMeta
|
|
||||||
__name__ = 'product.oneclick'
|
__name__ = 'product.oneclick'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
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 = {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue