Files
tryton/product.py
T
2018-06-26 19:11:57 +02:00

17 lines
548 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'])