Files
tryton/product.py
T
2016-02-28 14:54:50 +01:00

18 lines
557 B
Python

# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import fields
from trytond.pyson import Eval
from trytond.pool import PoolMeta
__all__ = ['Product']
class Product:
__metaclass__ = PoolMeta
__name__ = 'product.product'
locations = fields.One2Many('stock.product.location', 'product',
'Default Locations', states={
'invisible': ~Eval('type').in_(['goods', 'assets']),
},
depends=['type'])