forked from openlabs/trytond-pos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshipment.py
44 lines (34 loc) · 1.17 KB
/
shipment.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
35
36
37
38
39
40
41
42
43
44
# -*- coding: utf-8 -*-
"""
shipment.py
:copyright: (c) 2014 by Openlabs Technologies & Consulting (P) Limited
:license: BSD, see LICENSE for more details.
"""
from trytond.model import fields
from trytond.pool import PoolMeta
__metaclass__ = PoolMeta
__all__ = ['ShipmentOut', 'ShipmentOutReturn']
class ShipmentOut:
__name__ = 'stock.shipment.out'
delivery_mode = fields.Selection([
('pick_up', 'Pick Up'),
('ship', 'Ship'),
], 'Delivery Mode', required=True, readonly=True)
@staticmethod
def default_delivery_mode():
return 'ship'
class ShipmentOutReturn:
__name__ = 'stock.shipment.out.return'
# XXX: Not sure if pick_up is the right word here ?
# My intention is to indicate something like the customer walked into
# the store and returned this item.
#
# While ship indicates that the customer intends to ship the item back
# to us later by mail or something like that.
delivery_mode = fields.Selection([
('pick_up', 'Pick Up'),
('ship', 'Ship'),
], 'Delivery Mode', required=True, readonly=True)
@staticmethod
def default_delivery_mode():
return 'ship'