diff --git a/__init__.py b/__init__.py index 300ff1d..967c857 100644 --- a/__init__.py +++ b/__init__.py @@ -1,6 +1,6 @@ from trytond.pool import Pool from . import product -from . import machine + __all__ = ['register'] @@ -9,7 +9,3 @@ def register(): Pool.register( product.Product, module='optical_equipment', type_='model') - Pool.register( - module='optical_equipment', type_='wizard') - Pool.register( - module='optical_equipment', type_='report') diff --git a/product.py b/product.py index 7758136..f303974 100644 --- a/product.py +++ b/product.py @@ -1,17 +1,19 @@ +#This file is part of Tryton. The COPYRIGHT file at the top level of +#txhis repository contains the full copyright notices and license terms + from trytond.pool import Pool, PoolMeta -from trytond.model import ModelView, ModelSql +from trytond.model import ModelView, ModelSQL from trytond.model import fields -__all__ = [Product] +__all__ = ['Product'] _RISK = [(None, '')] _USE = [(None, '')] _BIOMEDICAL_CLASS = [(None, '')] _MAIN_TECNOLOGY = [(None, '')] -class Product(metaclass=PoolMeta): +class Product(ModelSQL, ModelView, metaclass=PoolMeta): 'Product' - __name__ = 'product.template' machine = fields.Boolean('It is machine') diff --git a/tryton.cfg b/tryton.cfg index 7dd7e04..0d5c9de 100644 --- a/tryton.cfg +++ b/tryton.cfg @@ -3,4 +3,6 @@ version=6.0 depends: ir product + country xml: + product.xml \ No newline at end of file