diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-11-25 12:13:35 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-11-25 12:13:35 +0200 |
commit | b841a1e5e198fa2f737fd97a4e574142b1734040 (patch) | |
tree | 2e38181a4b22d295bc5029edf4659c8d3f47fc19 /servo/models/common.py | |
parent | a8d2ae954c54f56f551ac2c3e5762a21bd0e651b (diff) | |
download | Servo-b841a1e5e198fa2f737fd97a4e574142b1734040.tar.gz Servo-b841a1e5e198fa2f737fd97a4e574142b1734040.tar.bz2 Servo-b841a1e5e198fa2f737fd97a4e574142b1734040.zip |
Add checkin flag to Locations
Diffstat (limited to 'servo/models/common.py')
-rw-r--r-- | servo/models/common.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/servo/models/common.py b/servo/models/common.py index 2ab81f0..eedba96 100644 --- a/servo/models/common.py +++ b/servo/models/common.py @@ -462,6 +462,19 @@ class Location(models.Model): verbose_name=_('Enabled') ) + checkin = models.BooleanField( + default=True, + verbose_name=_('Use for check-in') + ) + + @classmethod + def get_checkin_list(cls): + results = [] + for l in cls.objects.filter(checkin=True): + results.append({'pk': l.pk, 'name': l.title}) + + return results + def get_shipto_choices(self): return self.gsx_accounts.values_list('ship_to', 'ship_to') |