-
Notifications
You must be signed in to change notification settings - Fork 3
/
stock.py
34 lines (26 loc) · 917 Bytes
/
stock.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# -*- coding: utf-8 -*-
"""
:copyright: (c) 2014 by Openlabs Technologies & Consulting (P) Limited
:license: BSD, see LICENSE for more details.
"""
from trytond.model import ModelView, ModelSQL, fields
from trytond.pool import PoolMeta
from trytond.pyson import Eval
from incoterm import Incoterm
__all__ = ['ShipmentOut', 'ShipmentOutIncoterm']
__metaclass__ = PoolMeta
class ShipmentOut:
'Shipment Incoterm'
__name__ = 'stock.shipment.out'
incoterms = fields.One2Many(
'stock.shipment.out.incoterm', 'shipment_out',
'Stock Shipment Incoterm', states={
'readonly': Eval('state') != 'draft',
}, depends=['state'],
)
class ShipmentOutIncoterm(Incoterm, ModelSQL, ModelView):
'Shipment Out Incoterm'
__name__ = 'stock.shipment.out.incoterm'
shipment_out = fields.Many2One(
'stock.shipment.out', 'Shipment Out', required=True
)