trytond-stock_inventory_ref.../inventory.py
2018-09-19 07:55:21 +02:00

16 lines
538 B
Python

# This file is part stock_inventory_reference module for 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.pool import PoolMeta
from trytond.pyson import Eval, Not, Equal
__all__ = ['Inventory']
class Inventory(metaclass=PoolMeta):
__name__ = 'stock.inventory'
reference = fields.Char("Reference",
states={
'readonly': Not(Equal(Eval('state'), 'draft')),
}, depends=['state'])