mirror of
https://github.com/NaN-tic/trytond-stock_supply_direct.git
synced 2023-12-14 02:32:56 +01:00
23 lines
761 B
Python
23 lines
761 B
Python
# 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:
|
|
__metaclass__ = PoolMeta
|
|
__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'])
|