2015-04-28 16:35:20 +02:00
|
|
|
# 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.pool import PoolMeta
|
|
|
|
from trytond.pyson import Eval, Equal, Not
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = ['Template']
|
|
|
|
|
|
|
|
|
|
|
|
class Template:
|
2016-03-29 12:00:49 +02:00
|
|
|
__metaclass__ = PoolMeta
|
2015-04-28 16:35:20 +02:00
|
|
|
__name__ = 'product.template'
|
|
|
|
|
|
|
|
direct_stock_supply = fields.Boolean('Direct Stock Supply',
|
|
|
|
help='Generates a purchase request for each stock line of this '
|
|
|
|
'product regardless of the stock levels, when out/internal '
|
|
|
|
'shipments are assigned.',
|
|
|
|
states={
|
|
|
|
'invisible': ~Eval('purchasable') |
|
|
|
|
Not(Equal(Eval('type', 'goods'), 'goods')),
|
|
|
|
},
|
|
|
|
depends=['purchasable', 'type'])
|