2008-09-30 15:14:08 +02:00
|
|
|
#This file is part of Tryton. The COPYRIGHT file at the top level of
|
|
|
|
|
#this repository contains the full copyright notices and license terms.
|
2012-09-24 22:18:22 +02:00
|
|
|
from trytond.model import fields
|
2012-05-29 18:12:23 +02:00
|
|
|
from trytond.pyson import Eval
|
2012-09-24 22:18:22 +02:00
|
|
|
from trytond.pool import PoolMeta
|
|
|
|
|
|
|
|
|
|
__all__ = ['Product']
|
|
|
|
|
__metaclass__ = PoolMeta
|
2008-09-30 15:14:08 +02:00
|
|
|
|
|
|
|
|
|
2012-09-24 22:18:22 +02:00
|
|
|
class Product:
|
|
|
|
|
__name__ = 'product.product'
|
2008-09-30 15:14:08 +02:00
|
|
|
locations = fields.One2Many('stock.product.location', 'product',
|
2012-05-29 18:12:23 +02:00
|
|
|
'Default Locations', states={
|
|
|
|
|
'invisible': ~Eval('type').in_(['goods', 'assets']),
|
|
|
|
|
})
|